当前位置: 首页>>代码示例>>C#>>正文


C# IBinaryReader.GetRawReader方法代码示例

本文整理汇总了C#中IBinaryReader.GetRawReader方法的典型用法代码示例。如果您正苦于以下问题:C# IBinaryReader.GetRawReader方法的具体用法?C# IBinaryReader.GetRawReader怎么用?C# IBinaryReader.GetRawReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IBinaryReader的用法示例。


在下文中一共展示了IBinaryReader.GetRawReader方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ComputeFuncJob

        /// <summary>
        /// Initializes a new instance of the <see cref="ComputeFuncJob"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ComputeFuncJob(IBinaryReader reader)
        {
            var reader0 = (BinaryReader) reader.GetRawReader();

            _clo = reader0.ReadObject<IComputeFunc>();
            _arg = reader0.ReadObject<object>();
        }
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:11,代码来源:ComputeFuncJob.cs

示例2: ContinuousQueryFilterHolder

        /// <summary>
        /// Initializes a new instance of the <see cref="ContinuousQueryFilterHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ContinuousQueryFilterHolder(IBinaryReader reader)
        {
            var rawReader = (BinaryReader) reader.GetRawReader();

            _filter = rawReader.ReadObject<object>();
            _keepBinary = rawReader.ReadBoolean();
        }
开发者ID:dheep-purdessy,项目名称:ignite,代码行数:11,代码来源:ContinuousQueryFilterHolder.cs

示例3: SerializableObjectHolder

        /// <summary>
        /// Initializes a new instance of the <see cref="SerializableObjectHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public SerializableObjectHolder(IBinaryReader reader)
        {
            Debug.Assert(reader != null);

            var reader0 = (BinaryReader) reader.GetRawReader();

            _item = new BinaryFormatter().Deserialize(new BinaryStreamAdapter(reader0.Stream), null);
        }
开发者ID:dheep-purdessy,项目名称:ignite,代码行数:12,代码来源:SerializableObjectHolder.cs

示例4: ComputeJobHolder

        /// <summary>
        /// Default ctor for marshalling.
        /// </summary>
        /// <param name="reader"></param>
        public ComputeJobHolder(IBinaryReader reader)
        {
            Debug.Assert(reader != null);

            var reader0 = (BinaryReader) reader.GetRawReader();

            _ignite = reader0.Marshaller.Ignite;

            _job = reader0.ReadObject<IComputeJob>();
        }
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:14,代码来源:ComputeJobHolder.cs

示例5: ReadBinary

 /** <inheritDoc /> */
 public void ReadBinary(IBinaryReader reader)
 {
     A = reader.ReadInt("a");
     B = reader.GetRawReader().ReadInt();
 }
开发者ID:simonliusm,项目名称:ignite,代码行数:6,代码来源:BinaryBuilderSelfTest.cs

示例6: ReadBinary

            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>());
            }
开发者ID:vladisav,项目名称:ignite,代码行数:58,代码来源:BinaryReaderWriterTest.cs

示例7: CacheEntryProcessorHolder

        /// <summary>
        /// Initializes a new instance of the <see cref="CacheEntryProcessorHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public CacheEntryProcessorHolder(IBinaryReader reader)
        {
            var reader0 = (BinaryReader) reader.GetRawReader();

            _proc = reader0.ReadObject<object>();
            _arg = reader0.ReadObject<object>();

            _processFunc = GetProcessFunc(_proc);

            var kvTypes = DelegateTypeDescriptor.GetCacheEntryProcessorTypes(_proc.GetType());

            _entryCtor = MutableCacheEntry.GetCtor(kvTypes.Item1, kvTypes.Item2);
        }
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:17,代码来源:CacheEntryProcessorHolder.cs

示例8: DateTimeHolder

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public DateTimeHolder(IBinaryReader reader)
        {
            Debug.Assert(reader != null);

            _item = DateTime.FromBinary(reader.GetRawReader().ReadLong());
        }
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:10,代码来源:DateTimeHolder.cs

示例9: ComputeActionJob

        /// <summary>
        /// Initializes a new instance of the <see cref="ComputeActionJob"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public ComputeActionJob(IBinaryReader reader)
        {
            var reader0 = (BinaryReader)reader.GetRawReader();

            _action = reader0.ReadObject<IComputeAction>();
        }
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:10,代码来源:ComputeActionJob.cs

示例10: CacheEntryFilterHolder

        /// <summary>
        /// Initializes a new instance of the <see cref="CacheEntryFilterHolder"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public CacheEntryFilterHolder(IBinaryReader reader)
        {
            var reader0 = (BinaryReader)reader.GetRawReader();

            _pred = reader0.ReadObject<object>();

            _keepBinary = reader0.ReadBoolean();

            _marsh = reader0.Marshaller;

            _invoker = GetInvoker(_pred);
        }
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:16,代码来源:CacheEntryFilterHolder.cs


注:本文中的IBinaryReader.GetRawReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。