Esempio n. 1
0
        public override void ReadData(FastBinaryReader reader, Object additionalInfo)
        {
            Root = (RICustomData)reader.Tag;

            base.ReadData(reader, additionalInfo);

            // Hint is no longer used. This line is left here for backward compatibility
            reader.ReadSafeString();

            ColumnPos = reader.ReadInt16();
            Column    = Root.Columns[ColumnPos];
            Value     = null;

            if (!reader.IsNull())
            {
                switch (Column.FieldTypeId)
                {
                case RICustomDataFieldIdType.Decimal: Value = reader.ReadDecimal(); break;

                case RICustomDataFieldIdType.Integer: Value = reader.ReadInt64(); break;

                case RICustomDataFieldIdType.DateTime: Value = reader.ReadDateTime(); break;

                case RICustomDataFieldIdType.Boolean: Value = reader.ReadBoolean(); break;

                case RICustomDataFieldIdType.String: Value = reader.ReadString(); break;

                case RICustomDataFieldIdType.Object: Value = reader.ReadString(); break;

                case RICustomDataFieldIdType.Unknown: Value = reader.ReadString(); break;

                default: break;
                }
            }
        }