Ejemplo n.º 1
0
 public void ReadBinary(IBinaryReader reader)
 {
     Ppmonth                    = reader.ReadLong("ppmonth");
     Distributor                = reader.ReadLong("distributor");
     Storeid                    = reader.ReadString("storeid");
     Postalcode                 = reader.ReadString("postalcode");
     Outletstoreid              = reader.ReadString("outletstoreid");
     Dma                        = reader.ReadLong("dma");
     Year                       = reader.ReadLong("year");
     Yearhalf                   = reader.ReadLong("yearhalf");
     Yearqtr                    = reader.ReadLong("yearqtr");
     Yearmonth                  = reader.ReadLong("yearmonth");
     Outletfamily               = reader.ReadLong("outletfamily");
     Channel                    = reader.ReadLong("channel");
     Superchannel               = reader.ReadLong("superchannel");
     Retailerregion             = reader.ReadLong("retailerregion");
     Subchannel                 = reader.ReadLong("subchannel");
     Outlet                     = reader.ReadLong("outlet");
     State                      = reader.ReadLong("state");
     Censusdivisionusa          = reader.ReadLong("censusdivisionusa");
     Censusregionusa            = reader.ReadLong("censusregionusa");
     TotindStoresTotalvalue     = reader.ReadDouble("totind_stores_totalvalue");
     StoresTotalvalue           = reader.ReadDouble("stores_totalvalue");
     Numbermonths               = reader.ReadLong("numbermonths");
     Ppweek                     = reader.ReadLong("ppweek");
     ProjStoresTotalvalue       = reader.ReadDouble("proj_stores_totalvalue");
     TotindProjStoresTotalvalue = reader.ReadDouble("totind_proj_stores_totalvalue");
     FactorsTotalvalue          = reader.ReadDouble("factors_totalvalue");
     StoreWeight                = reader.ReadString("store_weight");
 }
Ejemplo n.º 2
0
 public void ReadBinary(IBinaryReader reader)
 {
     Atpseasn     = reader.ReadLong("atpseasn");
     Description  = reader.ReadString("description");
     Shortname    = reader.ReadString("shortname");
     Name         = reader.ReadString("name");
     Displayorder = reader.ReadLong("displayorder");
     Startrange   = reader.ReadDouble("startrange");
     Endrange     = reader.ReadDouble("endrange");
 }
Ejemplo n.º 3
0
 public void ReadBinary(IBinaryReader reader)
 {
     Censusregionusa = reader.ReadLong("censusregionusa");
     Description     = reader.ReadString("description");
     Shortname       = reader.ReadString("shortname");
     Name            = reader.ReadString("name");
     Displayorder    = reader.ReadLong("displayorder");
     Startrange      = reader.ReadDouble("startrange");
     Endrange        = reader.ReadDouble("endrange");
 }
Ejemplo n.º 4
0
 public void ReadBinary(IBinaryReader reader)
 {
     Brand        = reader.ReadLong("brand");
     Description  = reader.ReadString("description");
     Displayorder = reader.ReadLong("displayorder");
     Name         = reader.ReadString("name");
     Shortname    = reader.ReadString("shortname");
     Startrange   = reader.ReadDouble("startrange");
     Endrange     = reader.ReadDouble("endrange");
     Company      = reader.ReadLong("company");
 }
 public void ReadBinary(IBinaryReader reader)
 {
     Allsector    = reader.ReadLong("allsector");
     Description  = reader.ReadString("description");
     Displayorder = reader.ReadLong("displayorder");
     Name         = reader.ReadString("name");
     Shortname    = reader.ReadString("shortname");
     Startrange   = reader.ReadDouble("startrange");
     Endrange     = reader.ReadDouble("endrange");
     Allindustry  = reader.ReadLong("allindustry");
 }
Ejemplo n.º 6
0
 public void ReadBinary(IBinaryReader reader)
 {
     Alloutlet       = reader.ReadLong("alloutlet");
     Description     = reader.ReadString("description");
     Displayorder    = reader.ReadLong("displayorder");
     Name            = reader.ReadString("name");
     Shortname       = reader.ReadString("shortname");
     Startrange      = reader.ReadDouble("startrange");
     Endrange        = reader.ReadDouble("endrange");
     Alloutletfamily = reader.ReadLong("alloutletfamily");
 }
 public void ReadBinary(IBinaryReader reader)
 {
     Retsupercategoryderived = reader.ReadLong("retsupercategoryderived");
     Description             = reader.ReadString("description");
     Displayorder            = reader.ReadLong("displayorder");
     Name        = reader.ReadString("name");
     Shortname   = reader.ReadString("shortname");
     Startrange  = reader.ReadDouble("startrange");
     Endrange    = reader.ReadDouble("endrange");
     Altbusiness = reader.ReadLong("altbusiness");
 }
Ejemplo n.º 8
0
 public void ReadBinary(IBinaryReader reader)
 {
     Channel      = reader.ReadLong("channel");
     Description  = reader.ReadString("description");
     Displayorder = reader.ReadLong("displayorder");
     Name         = reader.ReadString("name");
     Shortname    = reader.ReadString("shortname");
     Startrange   = reader.ReadDouble("startrange");
     Endrange     = reader.ReadDouble("endrange");
     Superchannel = reader.ReadLong("superchannel");
 }
Ejemplo n.º 9
0
 public void ReadBinary(IBinaryReader reader)
 {
     Subclass     = reader.ReadLong("subclass");
     Description  = reader.ReadString("description");
     Displayorder = reader.ReadLong("displayorder");
     Name         = reader.ReadString("name");
     Shortname    = reader.ReadString("shortname");
     Startrange   = reader.ReadDouble("startrange");
     Endrange     = reader.ReadDouble("endrange");
     Categorytype = reader.ReadLong("categorytype");
 }
Ejemplo n.º 10
0
 public void ReadBinary(IBinaryReader reader)
 {
     AttributeDependentCodeset = reader.ReadString("attribute_dependent_codeset");
     AttributeName             = reader.ReadString("attribute_name");
     Code         = reader.ReadLong("code");
     Description  = reader.ReadString("description");
     Displayorder = reader.ReadLong("displayorder");
     Startrange   = reader.ReadDouble("startrange");
     Endrange     = reader.ReadDouble("endrange");
     Sbname       = reader.ReadString("sbname");
 }
 public void ReadBinary(IBinaryReader reader)
 {
     Outlet         = reader.ReadLong("outlet");
     Description    = reader.ReadString("description");
     Displayorder   = reader.ReadLong("displayorder");
     Name           = reader.ReadString("name");
     Shortname      = reader.ReadString("shortname");
     Startrange     = reader.ReadDouble("startrange");
     Endrange       = reader.ReadDouble("endrange");
     Retailerregion = reader.ReadLong("retailerregion");
 }
 public void ReadBinary(IBinaryReader reader)
 {
     Wearersubtype = reader.ReadLong("wearersubtype");
     Description   = reader.ReadString("description");
     Displayorder  = reader.ReadLong("displayorder");
     Name          = reader.ReadString("name");
     Shortname     = reader.ReadString("shortname");
     Startrange    = reader.ReadDouble("startrange");
     Endrange      = reader.ReadDouble("endrange");
     Wearertype    = reader.ReadLong("wearertype");
 }
 public void ReadBinary(IBinaryReader reader)
 {
     Itemnumber     = reader.ReadLong("itemnumber");
     Description    = reader.ReadString("description");
     Displayorder   = reader.ReadLong("displayorder");
     Name           = reader.ReadString("name");
     Shortname      = reader.ReadString("shortname");
     Startrange     = reader.ReadDouble("startrange");
     Endrange       = reader.ReadDouble("endrange");
     Brand          = reader.ReadLong("brand");
     Classification = reader.ReadLong("classification");
 }
Ejemplo n.º 14
0
 /** <inheritDoc /> */
 public void ReadBinary(IBinaryReader reader)
 {
     Byte         = reader.ReadByte("Byte");
     ByteArray    = reader.ReadByteArray("ByteArray");
     Char         = reader.ReadChar("Char");
     CharArray    = reader.ReadCharArray("CharArray");
     Short        = reader.ReadShort("Short");
     ShortArray   = reader.ReadShortArray("ShortArray");
     Int          = reader.ReadInt("Int");
     IntArray     = reader.ReadIntArray("IntArray");
     Long         = reader.ReadLong("Long");
     LongArray    = reader.ReadLongArray("LongArray");
     Boolean      = reader.ReadBoolean("Boolean");
     BooleanArray = reader.ReadBooleanArray("BooleanArray");
     Float        = reader.ReadFloat("Float");
     FloatArray   = reader.ReadFloatArray("FloatArray");
     Double       = reader.ReadDouble("Double");
     DoubleArray  = reader.ReadDoubleArray("DoubleArray");
     Decimal      = reader.ReadDecimal("Decimal");
     DecimalArray = reader.ReadDecimalArray("DecimalArray");
     Date         = reader.ReadTimestamp("Date");
     DateArray    = reader.ReadTimestampArray("DateArray");
     String       = reader.ReadString("String");
     StringArray  = reader.ReadStringArray("StringArray");
     Guid         = reader.ReadObject <Guid>("Guid");
     GuidArray    = reader.ReadGuidArray("GuidArray");
 }
Ejemplo n.º 15
0
            public void ReadBinary(IBinaryReader reader)
            {
                Assert.AreEqual(1, reader.ReadByte("Byte"));
                Assert.AreEqual(new byte[] { 1 }, reader.ReadByteArray("ByteArray"));
                Assert.AreEqual('1', reader.ReadChar("Char"));
                Assert.AreEqual(new[] { '1' }, reader.ReadCharArray("CharArray"));
                Assert.AreEqual(1, reader.ReadShort("Short"));
                Assert.AreEqual(new short[] { 1 }, reader.ReadShortArray("ShortArray"));
                Assert.AreEqual(1, reader.ReadInt("Int"));
                Assert.AreEqual(new[] { 1 }, reader.ReadIntArray("IntArray"));
                Assert.AreEqual(1, reader.ReadLong("Long"));
                Assert.AreEqual(new long[] { 1 }, reader.ReadLongArray("LongArray"));
                Assert.AreEqual(true, reader.ReadBoolean("Boolean"));
                Assert.AreEqual(new[] { true }, reader.ReadBooleanArray("BooleanArray"));
                Assert.AreEqual(1, reader.ReadFloat("Float"));
                Assert.AreEqual(new float[] { 1 }, reader.ReadFloatArray("FloatArray"));
                Assert.AreEqual(1, reader.ReadDouble("Double"));
                Assert.AreEqual(new double[] { 1 }, reader.ReadDoubleArray("DoubleArray"));
                Assert.AreEqual(1, reader.ReadDecimal("Decimal"));
                Assert.AreEqual(new decimal?[] { 1 }, reader.ReadDecimalArray("DecimalArray"));
                Assert.AreEqual(Date, reader.ReadTimestamp("Timestamp"));
                Assert.AreEqual(new DateTime?[] { Date }, reader.ReadTimestampArray("TimestampArray"));
                Assert.AreEqual("1", reader.ReadString("String"));
                Assert.AreEqual(new[] { "1" }, reader.ReadStringArray("StringArray"));
                Assert.AreEqual(Guid, reader.ReadGuid("Guid"));
                Assert.AreEqual(new Guid?[] { Guid }, reader.ReadGuidArray("GuidArray"));
                Assert.AreEqual(MyEnum.Bar, reader.ReadEnum <MyEnum>("Enum"));
                Assert.AreEqual(new[] { MyEnum.Bar }, reader.ReadEnumArray <MyEnum>("EnumArray"));

                var raw = reader.GetRawReader();

                Assert.AreEqual(1, raw.ReadByte());
                Assert.AreEqual(new byte[] { 1 }, raw.ReadByteArray());
                Assert.AreEqual('1', raw.ReadChar());
                Assert.AreEqual(new[] { '1' }, raw.ReadCharArray());
                Assert.AreEqual(1, raw.ReadShort());
                Assert.AreEqual(new short[] { 1 }, raw.ReadShortArray());
                Assert.AreEqual(1, raw.ReadInt());
                Assert.AreEqual(new[] { 1 }, raw.ReadIntArray());
                Assert.AreEqual(1, raw.ReadLong());
                Assert.AreEqual(new long[] { 1 }, raw.ReadLongArray());
                Assert.AreEqual(true, raw.ReadBoolean());
                Assert.AreEqual(new[] { true }, raw.ReadBooleanArray());
                Assert.AreEqual(1, raw.ReadFloat());
                Assert.AreEqual(new float[] { 1 }, raw.ReadFloatArray());
                Assert.AreEqual(1, raw.ReadDouble());
                Assert.AreEqual(new double[] { 1 }, raw.ReadDoubleArray());
                Assert.AreEqual(1, raw.ReadDecimal());
                Assert.AreEqual(new decimal?[] { 1 }, raw.ReadDecimalArray());
                Assert.AreEqual(Date, raw.ReadTimestamp());
                Assert.AreEqual(new DateTime?[] { Date }, raw.ReadTimestampArray());
                Assert.AreEqual("1", raw.ReadString());
                Assert.AreEqual(new[] { "1" }, raw.ReadStringArray());
                Assert.AreEqual(Guid, raw.ReadGuid());
                Assert.AreEqual(new Guid?[] { Guid }, raw.ReadGuidArray());
                Assert.AreEqual(MyEnum.Bar, raw.ReadEnum <MyEnum>());
                Assert.AreEqual(new[] { MyEnum.Bar }, raw.ReadEnumArray <MyEnum>());
            }
Ejemplo n.º 16
0
        /// <summary>
        /// Deserialize the message (assumes magic & type already read in)
        /// </summary>
        /// <param name="cin">Cin.</param>
        public override void Deserialize(IBinaryReader cin)
        {
            Length = cin.ReadInt32();
            Value  = new double[Length];

            for (int i = 0; i < Length; i++)
            {
                Value[i] = cin.ReadDouble();
            }
        }
Ejemplo n.º 17
0
        IResourceData ReadResourceData(List <UserResourceType> userTypes, int size)
        {
            uint code = ReadUInt32(reader);

            switch ((ResourceTypeCode)code)
            {
            case ResourceTypeCode.Null: return(resourceDataCreator.CreateNull());

            case ResourceTypeCode.String: return(resourceDataCreator.Create(reader.ReadString()));

            case ResourceTypeCode.Boolean: return(resourceDataCreator.Create(reader.ReadBoolean()));

            case ResourceTypeCode.Char: return(resourceDataCreator.Create((char)reader.ReadUInt16()));

            case ResourceTypeCode.Byte: return(resourceDataCreator.Create(reader.ReadByte()));

            case ResourceTypeCode.SByte: return(resourceDataCreator.Create(reader.ReadSByte()));

            case ResourceTypeCode.Int16: return(resourceDataCreator.Create(reader.ReadInt16()));

            case ResourceTypeCode.UInt16: return(resourceDataCreator.Create(reader.ReadUInt16()));

            case ResourceTypeCode.Int32: return(resourceDataCreator.Create(reader.ReadInt32()));

            case ResourceTypeCode.UInt32: return(resourceDataCreator.Create(reader.ReadUInt32()));

            case ResourceTypeCode.Int64: return(resourceDataCreator.Create(reader.ReadInt64()));

            case ResourceTypeCode.UInt64: return(resourceDataCreator.Create(reader.ReadUInt64()));

            case ResourceTypeCode.Single: return(resourceDataCreator.Create(reader.ReadSingle()));

            case ResourceTypeCode.Double: return(resourceDataCreator.Create(reader.ReadDouble()));

            case ResourceTypeCode.Decimal: return(resourceDataCreator.Create(reader.ReadDecimal()));

            case ResourceTypeCode.DateTime: return(resourceDataCreator.Create(new DateTime(reader.ReadInt64())));

            case ResourceTypeCode.TimeSpan: return(resourceDataCreator.Create(new TimeSpan(reader.ReadInt64())));

            case ResourceTypeCode.ByteArray: return(resourceDataCreator.Create(reader.ReadBytes(reader.ReadInt32())));

            case ResourceTypeCode.Stream: return(resourceDataCreator.CreateStream(reader.ReadBytes(reader.ReadInt32())));

            default:
                int userTypeIndex = (int)(code - (uint)ResourceTypeCode.UserTypes);
                if (userTypeIndex < 0 || userTypeIndex >= userTypes.Count)
                {
                    throw new ResourceReaderException(string.Format("Invalid resource data code: {0}", code));
                }
                return(resourceDataCreator.CreateSerialized(reader.ReadBytes(size)));
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Reads encoded constant from the stream.
        /// </summary>
        /// <param name="reader">Stream binary reader.</param>
        /// <returns>Mostly integer, but also carries type info, so it is returned as object.</returns>
        public static object ReadEncodedConstant(this IBinaryReader reader)
        {
            ushort type = reader.ReadUshort();

            if (type < (ushort)TypeLeafKind.LF_NUMERIC)
            {
                return(type);
            }

            switch ((TypeLeafKind)type)
            {
            case TypeLeafKind.LF_CHAR:
                return((sbyte)reader.ReadByte());

            case TypeLeafKind.LF_SHORT:
                return(reader.ReadShort());

            case TypeLeafKind.LF_USHORT:
                return(reader.ReadUshort());

            case TypeLeafKind.LF_LONG:
                return(reader.ReadInt());

            case TypeLeafKind.LF_ULONG:
                return(reader.ReadUint());

            case TypeLeafKind.LF_QUADWORD:
                return(reader.ReadLong());

            case TypeLeafKind.LF_UQUADWORD:
                return(reader.ReadUlong());

            case TypeLeafKind.LF_REAL32:
                return(reader.ReadFloat());

            case TypeLeafKind.LF_REAL64:
                return(reader.ReadDouble());

            case TypeLeafKind.LF_VARSTRING:
                return(reader.ReadBString());

            case TypeLeafKind.LF_DECIMAL:
                return(reader.ReadDecimal());

            case TypeLeafKind.LF_DATE:
                return(new DateTime(reader.ReadLong()));
            }

            throw new NotImplementedException();
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Deserialize the message (assumes magic & type already read in)
        /// </summary>
        /// <param name="cin">Cin.</param>
        public override void Deserialize(IBinaryReader cin)
        {
            IndexByName <string> rindex = null;
            IndexByName <string> cindex = null;

            var ridxlen = cin.ReadInt32();

            if (ridxlen > 0)
            {
                rindex = new IndexByName <string> ();
                for (int i = 0; i < ridxlen; i++)
                {
                    rindex.Add(cin.ReadString());
                }
            }

            var cidxlen = cin.ReadInt32();

            if (cidxlen > 0)
            {
                cindex = new IndexByName <string> ();
                for (int i = 0; i < cidxlen; i++)
                {
                    cindex.Add(cin.ReadString());
                }
            }

            var rows = cin.ReadInt32();
            var cols = cin.ReadInt32();

            Value = new IndexedMatrix(rows, cols, rindex, cindex);

            for (int ci = 0; ci < Value.ColumnCount; ci++)
            {
                for (int ri = 0; ri < Value.RowCount; ri++)
                {
                    Value[ri, ci] = cin.ReadDouble();
                }
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Deserialize the message (assumes magic & type already read in)
        /// </summary>
        /// <param name="cin">Cin.</param>
        public override void Deserialize(IBinaryReader cin)
        {
            var ridxlen = cin.ReadInt32();
            IndexByName <string> rindex = null;

            if (ridxlen > 0)
            {
                rindex = new IndexByName <string> ();
                for (int i = 0; i < ridxlen; i++)
                {
                    rindex.Add(cin.ReadString());
                }
            }

            var count = cin.ReadInt32();

            Value = new IndexedVector(count, rindex);

            for (int i = 0; i < count; i++)
            {
                Value[i] = cin.ReadDouble();
            }
        }
Ejemplo n.º 21
0
 public void ReadBinary(IBinaryReader reader)
 {
     Ppweek                     = reader.ReadLong("ppweek");
     Ppmonth                    = reader.ReadLong("ppmonth");
     Country                    = reader.ReadLong("country");
     Itemid                     = reader.ReadLong("itemid");
     Loadid                     = reader.ReadLong("loadid");
     PosId                      = reader.ReadLong("pos_id");
     Rid                        = reader.ReadLong("rid");
     Posoutlet                  = reader.ReadLong("posoutlet");
     Storeid                    = reader.ReadString("storeid");
     Postalcode                 = reader.ReadString("postalcode");
     Outletstoreid              = reader.ReadString("outletstoreid");
     RetailerItemId             = reader.ReadLong("retailer_item_id");
     Sku                        = reader.ReadString("sku");
     Itemnumber                 = reader.ReadLong("itemnumber");
     Wearertype                 = reader.ReadLong("wearertype");
     Wearersubtype              = reader.ReadLong("wearersubtype");
     Wearersize                 = reader.ReadLong("wearersize");
     Retailerregion             = reader.ReadLong("retailerregion");
     Wearersegment              = reader.ReadLong("wearersegment");
     Wearergender               = reader.ReadLong("wearergender");
     Superchannel               = reader.ReadLong("superchannel");
     Supercategory              = reader.ReadLong("supercategory");
     Subclass                   = reader.ReadLong("subclass");
     Outletfamily               = reader.ReadLong("outletfamily");
     Outlet                     = reader.ReadLong("outlet");
     Subchannel                 = reader.ReadLong("subchannel");
     Company                    = reader.ReadLong("company");
     Classification             = reader.ReadLong("classification");
     Class                      = reader.ReadLong("class");
     Channel                    = reader.ReadLong("channel");
     Categorytype               = reader.ReadLong("categorytype");
     Category                   = reader.ReadLong("category");
     Brandtype                  = reader.ReadLong("brandtype");
     Brandfamily                = reader.ReadLong("brandfamily");
     Brand                      = reader.ReadLong("brand");
     Itemnumbersuppressed       = reader.ReadLong("itemnumbersuppressed");
     Brandfamilysuppressed      = reader.ReadLong("brandfamilysuppressed");
     BrandfamilysuppressedOrg   = reader.ReadLong("brandfamilysuppressed_org");
     Brandfamilysuppressednc    = reader.ReadLong("brandfamilysuppressednc");
     BrandfamilysuppressedncOrg = reader.ReadLong("brandfamilysuppressednc_org");
     Brandsuppressed            = reader.ReadLong("brandsuppressed");
     BrandsuppressedOrg         = reader.ReadLong("brandsuppressed_org");
     Brandsuppressednc          = reader.ReadLong("brandsuppressednc");
     BrandsuppressedncOrg       = reader.ReadLong("brandsuppressednc_org");
     ItemnumbersuppressedOrg    = reader.ReadLong("itemnumbersuppressed_org");
     Brandtypesuppressed        = reader.ReadLong("brandtypesuppressed");
     BrandtypesuppressedOrg     = reader.ReadLong("brandtypesuppressed_org");
     Brandtypesuppressednc      = reader.ReadLong("brandtypesuppressednc");
     BrandtypesuppressedncOrg   = reader.ReadLong("brandtypesuppressednc_org");
     Itemnumbersuppressednc     = reader.ReadLong("itemnumbersuppressednc");
     ItemnumbersuppressedncOrg  = reader.ReadLong("itemnumbersuppressednc_org");
     Introdate                  = reader.ReadLong("introdate");
     Censusregionusa            = reader.ReadLong("censusregionusa");
     Censusdivisionusa          = reader.ReadLong("censusdivisionusa");
     State                      = reader.ReadLong("state");
     Dma                        = reader.ReadLong("dma");
     Cbsa                       = reader.ReadLong("cbsa");
     Distributor                = reader.ReadLong("distributor");
     Year                       = reader.ReadLong("year");
     Yearhalf                   = reader.ReadLong("yearhalf");
     Yearqtr                    = reader.ReadLong("yearqtr");
     Yearmonth                  = reader.ReadLong("yearmonth");
     Yearweek                   = reader.ReadLong("yearweek");
     RawInventory               = reader.ReadDouble("raw_inventory");
     RawUnitssold               = reader.ReadDouble("raw_unitssold");
     RawTotalvalue              = reader.ReadDouble("raw_totalvalue");
     Inventory                  = reader.ReadDouble("inventory");
     Unitssold                  = reader.ReadDouble("unitssold");
     Totalvalue                 = reader.ReadDouble("totalvalue");
     Trans                      = reader.ReadDouble("trans");
     ProjInventory              = reader.ReadDouble("proj_inventory");
     ProjUnitssold              = reader.ReadDouble("proj_unitssold");
     ProjTotalvalue             = reader.ReadDouble("proj_totalvalue");
     StoresTotalvalue           = reader.ReadDouble("stores_totalvalue");
     TotindStoresTotalvalue     = reader.ReadDouble("totind_stores_totalvalue");
     TotindProjStoresTotalvalue = reader.ReadDouble("totind_proj_stores_totalvalue");
     ProjStoresTotalvalue       = reader.ReadDouble("proj_stores_totalvalue");
     UnitsPerPackage            = reader.ReadDouble("units_per_package");
     StoresTotalvalueFactor     = reader.ReadDouble("stores_totalvalue_factor");
     UnitPrice                  = reader.ReadDouble("unit_price");
     ProjUnitPrice              = reader.ReadDouble("proj_unit_price");
     UpcCode                    = reader.ReadString("upc_code");
     UpcType                    = reader.ReadString("upc_type");
     StoreSublvlTotalvalue      = reader.ReadDouble("store_sublvl_totalvalue");
     PostalSublvlTotalvalue     = reader.ReadDouble("postal_sublvl_totalvalue");
     Outletpostalcode           = reader.ReadString("outletpostalcode");
     Skusuppressed              = reader.ReadString("skusuppressed");
     Itemidsuppressed           = reader.ReadString("itemidsuppressed");
     RetailerItemIdsuppressed   = reader.ReadLong("retailer_item_idsuppressed");
     RetailerItemIdsuppressednc = reader.ReadLong("retailer_item_idsuppressednc");
     Itemidsuppressednc         = reader.ReadString("itemidsuppressednc");
     Skusuppressednc            = reader.ReadString("skusuppressednc");
     UpcCodesuppressednc        = reader.ReadString("upc_codesuppressednc");
     UpcCodesuppressed          = reader.ReadString("upc_codesuppressed");
     RactuntsAdj                = reader.ReadDouble("ractunts_adj");
     RunitsAdj                  = reader.ReadDouble("runits_adj");
     UnitsAdj                   = reader.ReadDouble("units_adj");
     RdollarsAdj                = reader.ReadDouble("rdollars_adj");
     DollarsAdj                 = reader.ReadDouble("dollars_adj");
     Outletallocation           = reader.ReadLong("outletallocation");
     ActuntsAdj                 = reader.ReadDouble("actunts_adj");
     ActualUnits                = reader.ReadDouble("actual_units");
     ProjActualUnits            = reader.ReadDouble("proj_actual_units");
     Numweeks                   = reader.ReadLong("numweeks");
     StoreWeight                = reader.ReadString("store_weight");
     AvgUnitPrice               = reader.ReadDouble("avg_unit_price");
     AvgPrjUnitPrice            = reader.ReadDouble("avg_prj_unit_price");
     AvgActUnitPrice            = reader.ReadDouble("avg_act_unit_price");
     AvgPrjActUnitPrice         = reader.ReadDouble("avg_prj_act_unit_price");
     Allbrandcompanysuppressed  = reader.ReadLong("allbrandcompanysuppressed");
     Allbrandsuppressed         = reader.ReadLong("allbrandsuppressed");
     Allbrandfamilysuppressed   = reader.ReadLong("allbrandfamilysuppressed");
     Allbrandderivedsuppressed  = reader.ReadLong("allbrandderivedsuppressed");
     Allbrandcompany            = reader.ReadLong("allbrandcompany");
     Allbrandderived            = reader.ReadLong("allbrandderived");
     Alloutlet                  = reader.ReadLong("alloutlet");
     Altbusiness                = reader.ReadLong("altbusiness");
     Alloutletfamily            = reader.ReadLong("alloutletfamily");
     Retsupercategoryderived    = reader.ReadLong("retsupercategoryderived");
     Retsubcategoryderived      = reader.ReadLong("retsubcategoryderived");
     Rethidsubcategoryderived   = reader.ReadLong("rethidsubcategoryderived");
     Wearerderived              = reader.ReadLong("wearerderived");
     Allindustry                = reader.ReadLong("allindustry");
     Wearergenderderived        = reader.ReadLong("wearergenderderived");
     Allcategoryderived         = reader.ReadLong("allcategoryderived");
     Allsector                  = reader.ReadLong("allsector");
     Alloutletderived           = reader.ReadLong("alloutletderived");
     Allbrandfamily             = reader.ReadLong("allbrandfamily");
     Allbrand                   = reader.ReadLong("allbrand");
     Retcategoryderived         = reader.ReadLong("retcategoryderived");
     Allsubcategoryderived      = reader.ReadLong("allsubcategoryderived");
     Retcategorygroupderived    = reader.ReadLong("retcategorygroupderived");
     Bbysubclass                = reader.ReadLong("bbysubclass");
     Bbymerchantlevel           = reader.ReadLong("bbymerchantlevel");
     Bbyvplevel                 = reader.ReadLong("bbyvplevel");
     Bbydepartment              = reader.ReadLong("bbydepartment");
     Bbyclass                   = reader.ReadLong("bbyclass");
     Bbybusinessgroup           = reader.ReadLong("bbybusinessgroup");
     AvgPrjActUnitPriceOutlet   = reader.ReadDouble("avg_prj_act_unit_price_outlet");
     AvgActUnitPriceChannel     = reader.ReadDouble("avg_act_unit_price_channel");
     AvgPrjActUnitPriceChannel  = reader.ReadDouble("avg_prj_act_unit_price_channel");
     AvgUnitPriceOutlet         = reader.ReadDouble("avg_unit_price_outlet");
     AvgPrjUnitPriceChannel     = reader.ReadDouble("avg_prj_unit_price_channel");
     AvgUnitPriceChannel        = reader.ReadDouble("avg_unit_price_channel");
     AvgActUnitPriceOutlet      = reader.ReadDouble("avg_act_unit_price_outlet");
     AvgPrjUnitPriceOutlet      = reader.ReadDouble("avg_prj_unit_price_outlet");
 }
Ejemplo n.º 22
0
        private object ReadItem(BSonItemType type, out string key)
        {
            int length;
            int dataOffset;

            key        = _input.ReadStringUTF8(int.MaxValue);
            dataOffset = _input.Offset;
            switch (type)
            {
            case BSonItemType.Double:
                return(_factory.CreateNumber(_input.ReadDouble()));

            case BSonItemType.String:
            case BSonItemType.JavaScript:
            case BSonItemType.Symbol:
                length = _input.ReadInt32();
                return(_factory.CreateString(_input.ReadStringUTF8(length)));

            case BSonItemType.Object:
                return(ReadDocument());

            case BSonItemType.Array:
                return(ReadArray());

            case BSonItemType.Binary:
                throw new FormatException("Unsupported 'binary' field at " + dataOffset);

            case BSonItemType.Undefined:
                throw new FormatException("Unsupported 'undefined' field at " + dataOffset);

            case BSonItemType.ObjectID:
                throw new FormatException("Unsupported 'object-id' field at " + dataOffset);

            case BSonItemType.Boolean:
                return(_factory.CreateKeyword(_input.ReadByte() > 0 ? JSonReader.TrueTokenData : JSonReader.FalseTokenData));

            case BSonItemType.DateTime:
                return(_factory.CreateNumber(_input.ReadUInt64()));

            case BSonItemType.Null:
                return(_factory.CreateKeyword(JSonReader.FalseTokenData));

            case BSonItemType.RegExp:
                return(ReadRegExp());

            case BSonItemType.DbPointer:
                throw new FormatException("Unsupported 'DbPointer' field at " + dataOffset);

            case BSonItemType.JavaScriptScoped:
                return(ReadJavaScriptScoped());

            case BSonItemType.Int32:
                return(_factory.CreateNumber(_input.ReadInt32()));

            case BSonItemType.Timestamp:
                return(_factory.CreateNumber(_input.ReadInt64()));

            case BSonItemType.Int64:
                return(_factory.CreateNumber(_input.ReadInt64()));

            default:
                throw new FormatException("Unsupported '" + type + "' field at " + dataOffset);
            }
        }
Ejemplo n.º 23
0
 /// <summary>
 /// Reads a <see cref="Double"/> at offset <paramref name="offset"/>
 /// </summary>
 /// <param name="reader">this</param>
 /// <param name="offset">Offset</param>
 /// <returns>The <see cref="Double"/></returns>
 public static double ReadDoubleAt(this IBinaryReader reader, long offset)
 {
     reader.Position = offset;
     return(reader.ReadDouble());
 }
Ejemplo n.º 24
0
        object ReadValue(SerializationType etype, TypeSig argType, out TypeSig realArgType)
        {
            if (!recursionCounter.Increment())
            {
                throw new CABlobParserException("Too much recursion");
            }

            object result;

            switch (etype)
            {
            case SerializationType.Boolean:
                realArgType = module.CorLibTypes.Boolean;
                result      = reader.ReadByte() != 0;
                break;

            case SerializationType.Char:
                realArgType = module.CorLibTypes.Char;
                result      = (char)reader.ReadUInt16();
                break;

            case SerializationType.I1:
                realArgType = module.CorLibTypes.SByte;
                result      = reader.ReadSByte();
                break;

            case SerializationType.U1:
                realArgType = module.CorLibTypes.Byte;
                result      = reader.ReadByte();
                break;

            case SerializationType.I2:
                realArgType = module.CorLibTypes.Int16;
                result      = reader.ReadInt16();
                break;

            case SerializationType.U2:
                realArgType = module.CorLibTypes.UInt16;
                result      = reader.ReadUInt16();
                break;

            case SerializationType.I4:
                realArgType = module.CorLibTypes.Int32;
                result      = reader.ReadInt32();
                break;

            case SerializationType.U4:
                realArgType = module.CorLibTypes.UInt32;
                result      = reader.ReadUInt32();
                break;

            case SerializationType.I8:
                realArgType = module.CorLibTypes.Int64;
                result      = reader.ReadInt64();
                break;

            case SerializationType.U8:
                realArgType = module.CorLibTypes.UInt64;
                result      = reader.ReadUInt64();
                break;

            case SerializationType.R4:
                realArgType = module.CorLibTypes.Single;
                result      = reader.ReadSingle();
                break;

            case SerializationType.R8:
                realArgType = module.CorLibTypes.Double;
                result      = reader.ReadDouble();
                break;

            case SerializationType.String:
                realArgType = module.CorLibTypes.String;
                result      = ReadUTF8String();
                break;

            // It's ET.ValueType if it's eg. a ctor enum arg type
            case (SerializationType)ElementType.ValueType:
                if (argType == null)
                {
                    throw new CABlobParserException("Invalid element type");
                }
                realArgType = argType;
                result      = ReadEnumValue(GetEnumUnderlyingType(argType));
                break;

            // It's ET.Object if it's a ctor object arg type
            case (SerializationType)ElementType.Object:
            case SerializationType.TaggedObject:
                realArgType = ReadFieldOrPropType();
                var arraySig = realArgType as SZArraySig;
                if (arraySig != null)
                {
                    result = ReadArrayArgument(arraySig);
                }
                else
                {
                    TypeSig tmpType;
                    result = ReadValue((SerializationType)realArgType.ElementType, realArgType, out tmpType);
                }
                break;

            // It's ET.Class if it's eg. a ctor System.Type arg type
            case (SerializationType)ElementType.Class:
                var tdr = argType as TypeDefOrRefSig;
                if (tdr != null && tdr.DefinitionAssembly.IsCorLib() && tdr.Namespace == "System")
                {
                    if (tdr.TypeName == "Type")
                    {
                        result = ReadValue(SerializationType.Type, tdr, out realArgType);
                        break;
                    }
                    if (tdr.TypeName == "String")
                    {
                        result = ReadValue(SerializationType.String, tdr, out realArgType);
                        break;
                    }
                    if (tdr.TypeName == "Object")
                    {
                        result = ReadValue(SerializationType.TaggedObject, tdr, out realArgType);
                        break;
                    }
                }

                // Assume it's an enum that couldn't be resolved
                realArgType = argType;
                result      = ReadEnumValue(null);
                break;

            case SerializationType.Type:
                realArgType = argType;
                result      = ReadType(true);
                break;

            case SerializationType.Enum:
                realArgType = ReadType(false);
                result      = ReadEnumValue(GetEnumUnderlyingType(realArgType));
                break;

            default:
                throw new CABlobParserException("Invalid element type");
            }

            recursionCounter.Decrement();
            return(result);
        }
Ejemplo n.º 25
0
        private static void ReadContainer(IBinaryReader reader, IHerculesTagsBuilder builder)
        {
            var tagsCount = reader.ReadInt16();

            for (var i = 0; i < tagsCount; i++)
            {
                var key       = reader.ReadShortString();
                var valueType = (TagType)reader.ReadByte();

                switch (valueType)
                {
                case TagType.String:
                    builder.AddValue(key, reader.ReadString());
                    break;

                case TagType.Long:
                    builder.AddValue(key, reader.ReadInt64());
                    break;

                case TagType.Uuid:
                    builder.AddValue(key, reader.ReadGuid());
                    break;

                case TagType.Container:
                    builder.AddContainer(key, b => ReadContainer(reader, b));
                    break;

                case TagType.Integer:
                    builder.AddValue(key, reader.ReadInt32());
                    break;

                case TagType.Double:
                    builder.AddValue(key, reader.ReadDouble());
                    break;

                case TagType.Flag:
                    builder.AddValue(key, reader.ReadBool());
                    break;

                case TagType.Null:
                    builder.AddNull(key);
                    break;

                case TagType.Byte:
                    builder.AddValue(key, reader.ReadByte());
                    break;

                case TagType.Short:
                    builder.AddValue(key, reader.ReadInt16());
                    break;

                case TagType.Float:
                    builder.AddValue(key, reader.ReadFloat());
                    break;

                case TagType.Vector:
                    ReadVector(reader, builder, key);
                    break;

                default:
                    throw new ArgumentOutOfRangeException(nameof(valueType), valueType, "Unexpected tag value type.");
                }
            }
        }
Ejemplo n.º 26
0
 /// <summary>
 /// Deserialize the message (assumes magic & type already read in)
 /// </summary>
 /// <param name="cin">Cin.</param>
 public override void Deserialize(IBinaryReader cin)
 {
     Value = cin.ReadDouble();
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Reads an <see cref="T:System.Double"/> value from a specified <see cref="T:ExitGames.IO.IBinaryReader"/>
 /// </summary>
 /// <param name="binaryReader">The <see cref="T:ExitGames.IO.IBinaryReader"/> to read from.</param>
 /// <param name="result">When this method returns true, contains the value that was read from the <see cref="T:ExitGames.IO.IBinaryReader"/>.</param>
 /// <returns>True if the value was successfully read; otherwise false.</returns>
 public static bool ReadDouble(IBinaryReader binaryReader, out object result)
 {
     result = binaryReader.ReadDouble();
     return(true);
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Reads a <see cref="OperandType.InlineR"/> operand
 /// </summary>
 /// <param name="instr">The current instruction</param>
 /// <returns>The operand</returns>
 protected virtual double ReadInlineR(Instruction instr)
 {
     return(reader.ReadDouble());
 }
Ejemplo n.º 29
0
 public void ReadBinary(IBinaryReader reader)
 {
     Ppmonth                    = reader.ReadLong("ppmonth");
     Ppweek                     = reader.ReadLong("ppweek");
     Distributor                = reader.ReadLong("distributor");
     Posoutlet                  = reader.ReadLong("posoutlet");
     Storeid                    = reader.ReadString("storeid");
     Postalcode                 = reader.ReadString("postalcode");
     Outletstoreid              = reader.ReadString("outletstoreid");
     Loadid                     = reader.ReadLong("loadid");
     Dma                        = reader.ReadLong("dma");
     Year                       = reader.ReadLong("year");
     Yearhalf                   = reader.ReadLong("yearhalf");
     Yearqtr                    = reader.ReadLong("yearqtr");
     Yearmonth                  = reader.ReadLong("yearmonth");
     Yearweek                   = reader.ReadLong("yearweek");
     Supercategory              = reader.ReadLong("supercategory");
     Subclass                   = reader.ReadLong("subclass");
     Category                   = reader.ReadLong("category");
     Categorytype               = reader.ReadLong("categorytype");
     Brand                      = reader.ReadLong("brand");
     Brandfamily                = reader.ReadLong("brandfamily");
     Channel                    = reader.ReadLong("channel");
     Class                      = reader.ReadLong("class");
     Classification             = reader.ReadLong("classification");
     Company                    = reader.ReadLong("company");
     Wearertype                 = reader.ReadLong("wearertype");
     Wearersubtype              = reader.ReadLong("wearersubtype");
     Subchannel                 = reader.ReadLong("subchannel");
     Wearersize                 = reader.ReadLong("wearersize");
     Wearersegment              = reader.ReadLong("wearersegment");
     Outlet                     = reader.ReadLong("outlet");
     Brandtype                  = reader.ReadLong("brandtype");
     Outletfamily               = reader.ReadLong("outletfamily");
     Retailerregion             = reader.ReadLong("retailerregion");
     Wearergender               = reader.ReadLong("wearergender");
     Superchannel               = reader.ReadLong("superchannel");
     State                      = reader.ReadLong("state");
     Censusregionusa            = reader.ReadLong("censusregionusa");
     Censusdivisionusa          = reader.ReadLong("censusdivisionusa");
     Inventory                  = reader.ReadDouble("inventory");
     Unitssold                  = reader.ReadDouble("unitssold");
     Totalvalue                 = reader.ReadDouble("totalvalue");
     Trans                      = reader.ReadDouble("trans");
     ProjInventory              = reader.ReadDouble("proj_inventory");
     ProjUnitssold              = reader.ReadDouble("proj_unitssold");
     ProjTotalvalue             = reader.ReadDouble("proj_totalvalue");
     TotindStoresTotalvalue     = reader.ReadDouble("totind_stores_totalvalue");
     StoresTotalvalue           = reader.ReadDouble("stores_totalvalue");
     StoreWeight                = reader.ReadString("store_weight");
     BrandfamilysuppressedncOrg = reader.ReadLong("brandfamilysuppressednc_org");
     BrandtypesuppressedOrg     = reader.ReadLong("brandtypesuppressed_org");
     Brandfamilysuppressed      = reader.ReadLong("brandfamilysuppressed");
     BrandsuppressedncOrg       = reader.ReadLong("brandsuppressednc_org");
     Brandsuppressed            = reader.ReadLong("brandsuppressed");
     BrandsuppressedOrg         = reader.ReadLong("brandsuppressed_org");
     BrandtypesuppressedncOrg   = reader.ReadLong("brandtypesuppressednc_org");
     Brandtypesuppressednc      = reader.ReadLong("brandtypesuppressednc");
     ProjStoresTotalvalue       = reader.ReadDouble("proj_stores_totalvalue");
     TotindProjStoresTotalvalue = reader.ReadDouble("totind_proj_stores_totalvalue");
     BrandfamilysuppressedOrg   = reader.ReadLong("brandfamilysuppressed_org");
     Brandtypesuppressed        = reader.ReadLong("brandtypesuppressed");
     Brandsuppressednc          = reader.ReadLong("brandsuppressednc");
     Brandfamilysuppressednc    = reader.ReadLong("brandfamilysuppressednc");
     ProjUnitPrice              = reader.ReadDouble("proj_unit_price");
     StoreSublvlTotalvalue      = reader.ReadDouble("store_sublvl_totalvalue");
     PostalSublvlTotalvalue     = reader.ReadDouble("postal_sublvl_totalvalue");
     Outletallocation           = reader.ReadLong("outletallocation");
     Outletpostalcode           = reader.ReadString("outletpostalcode");
     ActualUnits                = reader.ReadDouble("actual_units");
     ProjActualUnits            = reader.ReadDouble("proj_actual_units");
     Numweeks                   = reader.ReadLong("numweeks");
     RdollarsAdj                = reader.ReadDouble("rdollars_adj");
     DollarsAdj                 = reader.ReadDouble("dollars_adj");
     UnitsAdj                   = reader.ReadDouble("units_adj");
     RunitsAdj                  = reader.ReadDouble("runits_adj");
 }
Ejemplo n.º 30
0
 /** <inheritDoc /> */
 public void ReadBinary(IBinaryReader reader)
 {
     Byte = reader.ReadByte("Byte");
     ByteArray = reader.ReadByteArray("ByteArray");
     Char = reader.ReadChar("Char");
     CharArray = reader.ReadCharArray("CharArray");
     Short = reader.ReadShort("Short");
     ShortArray = reader.ReadShortArray("ShortArray");
     Int = reader.ReadInt("Int");
     IntArray = reader.ReadIntArray("IntArray");
     Long = reader.ReadLong("Long");
     LongArray = reader.ReadLongArray("LongArray");
     Boolean = reader.ReadBoolean("Boolean");
     BooleanArray = reader.ReadBooleanArray("BooleanArray");
     Float = reader.ReadFloat("Float");
     FloatArray = reader.ReadFloatArray("FloatArray");
     Double = reader.ReadDouble("Double");
     DoubleArray = reader.ReadDoubleArray("DoubleArray");
     Decimal = reader.ReadDecimal("Decimal");
     DecimalArray = reader.ReadDecimalArray("DecimalArray");
     Date = reader.ReadTimestamp("Date");
     DateArray = reader.ReadTimestampArray("DateArray");
     String = reader.ReadString("String");
     StringArray = reader.ReadStringArray("StringArray");
     Guid = reader.ReadObject<Guid>("Guid");
     GuidArray = reader.ReadGuidArray("GuidArray");
 }
Ejemplo n.º 31
0
            public void ReadBinary(IBinaryReader reader)
            {
                Assert.AreEqual(1, reader.ReadByte("Byte"));
                Assert.AreEqual(new byte[] {1}, reader.ReadByteArray("ByteArray"));
                Assert.AreEqual('1', reader.ReadChar("Char"));
                Assert.AreEqual(new[] {'1'}, reader.ReadCharArray("CharArray"));
                Assert.AreEqual(1, reader.ReadShort("Short"));
                Assert.AreEqual(new short[] {1}, reader.ReadShortArray("ShortArray"));
                Assert.AreEqual(1, reader.ReadInt("Int"));
                Assert.AreEqual(new[] {1}, reader.ReadIntArray("IntArray"));
                Assert.AreEqual(1, reader.ReadLong("Long"));
                Assert.AreEqual(new long[] {1}, reader.ReadLongArray("LongArray"));
                Assert.AreEqual(true, reader.ReadBoolean("Boolean"));
                Assert.AreEqual(new[] {true}, reader.ReadBooleanArray("BooleanArray"));
                Assert.AreEqual(1, reader.ReadFloat("Float"));
                Assert.AreEqual(new float[] {1}, reader.ReadFloatArray("FloatArray"));
                Assert.AreEqual(1, reader.ReadDouble("Double"));
                Assert.AreEqual(new double[] {1}, reader.ReadDoubleArray("DoubleArray"));
                Assert.AreEqual(1, reader.ReadDecimal("Decimal"));
                Assert.AreEqual(new decimal?[] {1}, reader.ReadDecimalArray("DecimalArray"));
                Assert.AreEqual(Date, reader.ReadTimestamp("Timestamp"));
                Assert.AreEqual(new DateTime?[] {Date}, reader.ReadTimestampArray("TimestampArray"));
                Assert.AreEqual("1", reader.ReadString("String"));
                Assert.AreEqual(new[] {"1"}, reader.ReadStringArray("StringArray"));
                Assert.AreEqual(Guid, reader.ReadGuid("Guid"));
                Assert.AreEqual(new Guid?[] {Guid}, reader.ReadGuidArray("GuidArray"));
                Assert.AreEqual(MyEnum.Bar, reader.ReadEnum<MyEnum>("Enum"));
                Assert.AreEqual(new[] {MyEnum.Bar}, reader.ReadEnumArray<MyEnum>("EnumArray"));

                var raw = reader.GetRawReader();

                Assert.AreEqual(1, raw.ReadByte());
                Assert.AreEqual(new byte[] { 1 }, raw.ReadByteArray());
                Assert.AreEqual('1', raw.ReadChar());
                Assert.AreEqual(new[] { '1' }, raw.ReadCharArray());
                Assert.AreEqual(1, raw.ReadShort());
                Assert.AreEqual(new short[] { 1 }, raw.ReadShortArray());
                Assert.AreEqual(1, raw.ReadInt());
                Assert.AreEqual(new[] { 1 }, raw.ReadIntArray());
                Assert.AreEqual(1, raw.ReadLong());
                Assert.AreEqual(new long[] { 1 }, raw.ReadLongArray());
                Assert.AreEqual(true, raw.ReadBoolean());
                Assert.AreEqual(new[] { true }, raw.ReadBooleanArray());
                Assert.AreEqual(1, raw.ReadFloat());
                Assert.AreEqual(new float[] { 1 }, raw.ReadFloatArray());
                Assert.AreEqual(1, raw.ReadDouble());
                Assert.AreEqual(new double[] { 1 }, raw.ReadDoubleArray());
                Assert.AreEqual(1, raw.ReadDecimal());
                Assert.AreEqual(new decimal?[] { 1 }, raw.ReadDecimalArray());
                Assert.AreEqual(Date, raw.ReadTimestamp());
                Assert.AreEqual(new DateTime?[] { Date }, raw.ReadTimestampArray());
                Assert.AreEqual("1", raw.ReadString());
                Assert.AreEqual(new[] { "1" }, raw.ReadStringArray());
                Assert.AreEqual(Guid, raw.ReadGuid());
                Assert.AreEqual(new Guid?[] { Guid }, raw.ReadGuidArray());
                Assert.AreEqual(MyEnum.Bar, raw.ReadEnum<MyEnum>());
                Assert.AreEqual(new[] { MyEnum.Bar }, raw.ReadEnumArray<MyEnum>());
            }
Ejemplo n.º 32
0
 object IOperandReader.Read(IBinaryReader reader, Context.IOperandReaderContext context)
 {
     return(reader.ReadDouble());
 }