Esempio n. 1
0
        public FdbRowData(BinaryReader reader, FdbRowDataHeader header)
        {
            Types = new DataType[header.ColumnCount];
            Data  = new object[header.ColumnCount];

            for (var i = 0; i < header.ColumnCount; i++)
            {
                Types[i] = (DataType)reader.ReadUInt32();

                switch (Types[i])
                {
                case DataType.Nothing:
                    Data[i] = reader.ReadInt32();
                    break;

                case DataType.Integer:
                    Data[i] = reader.ReadInt32();
                    break;

                case DataType.Unknown1:
                    Data[i] = reader.ReadInt32();
                    break;

                case DataType.Float:
                    Data[i] = reader.ReadSingle();
                    break;

                case DataType.Text:
                    Data[i] = new FdbString(reader);
                    break;

                case DataType.Boolean:
                    Data[i] = reader.ReadInt32() != 0;
                    break;

                case DataType.Bigint:
                    Data[i] = new FdbBitInt(reader);
                    break;

                case DataType.Unknown2:
                    Data[i] = reader.ReadInt32();
                    break;

                case DataType.Varchar:
                    Data[i] = new FdbString(reader);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
        }
Esempio n. 2
0
        public FdbRowInfo(BinaryReader reader)
        {
            using (var s = new FdbScope(reader, true))
            {
                if (s)
                {
                    DataHeader = new FdbRowDataHeader(reader);
                }
            }

            using (var s = new FdbScope(reader, true))
            {
                if (s)
                {
                    Linked = new FdbRowInfo(reader);
                }
            }
        }
Esempio n. 3
0
 public FdbRowData(FdbRowDataHeader header)
 {
     Types = new DataType[header.ColumnCount];
     Data  = new object[header.ColumnCount];
 }