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


C# __BinaryParser.ReadInt32方法代码示例

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


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

示例1: Read

 public void Read(__BinaryParser input)
 {
     this.objectId = input.ReadInt32();
     this.name = input.ReadString();
     this.numMembers = input.ReadInt32();
     this.memberNames = new string[this.numMembers];
     this.binaryTypeEnumA = new BinaryTypeEnum[this.numMembers];
     this.typeInformationA = new object[this.numMembers];
     this.memberAssemIds = new int[this.numMembers];
     for (int i = 0; i < this.numMembers; i++)
     {
         this.memberNames[i] = input.ReadString();
     }
     for (int j = 0; j < this.numMembers; j++)
     {
         this.binaryTypeEnumA[j] = (BinaryTypeEnum) input.ReadByte();
     }
     for (int k = 0; k < this.numMembers; k++)
     {
         if ((this.binaryTypeEnumA[k] != BinaryTypeEnum.ObjectUrt) && (this.binaryTypeEnumA[k] != BinaryTypeEnum.ObjectUser))
         {
             this.typeInformationA[k] = BinaryConverter.ReadTypeInfo(this.binaryTypeEnumA[k], input, out this.memberAssemIds[k]);
         }
         else
         {
             BinaryConverter.ReadTypeInfo(this.binaryTypeEnumA[k], input, out this.memberAssemIds[k]);
         }
     }
     if (this.binaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapTypedAssemId)
     {
         this.assemId = input.ReadInt32();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:BinaryObjectWithMapTyped.cs

示例2: Read

        public void Read(__BinaryParser input)
        {
            switch (this.binaryHeaderEnum)
            {
                case BinaryHeaderEnum.ArraySinglePrimitive:
                    this.objectId = input.ReadInt32();
                    this.lengthA = new int[] { input.ReadInt32() };
                    this.binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
                    this.rank = 1;
                    this.lowerBoundA = new int[this.rank];
                    this.binaryTypeEnum = BinaryTypeEnum.Primitive;
                    this.typeInformation = (InternalPrimitiveTypeE) input.ReadByte();
                    return;

                case BinaryHeaderEnum.ArraySingleObject:
                    this.objectId = input.ReadInt32();
                    this.lengthA = new int[] { input.ReadInt32() };
                    this.binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
                    this.rank = 1;
                    this.lowerBoundA = new int[this.rank];
                    this.binaryTypeEnum = BinaryTypeEnum.Object;
                    this.typeInformation = null;
                    return;

                case BinaryHeaderEnum.ArraySingleString:
                    this.objectId = input.ReadInt32();
                    this.lengthA = new int[] { input.ReadInt32() };
                    this.binaryArrayTypeEnum = BinaryArrayTypeEnum.Single;
                    this.rank = 1;
                    this.lowerBoundA = new int[this.rank];
                    this.binaryTypeEnum = BinaryTypeEnum.String;
                    this.typeInformation = null;
                    return;
            }
            this.objectId = input.ReadInt32();
            this.binaryArrayTypeEnum = (BinaryArrayTypeEnum) input.ReadByte();
            this.rank = input.ReadInt32();
            this.lengthA = new int[this.rank];
            this.lowerBoundA = new int[this.rank];
            for (int i = 0; i < this.rank; i++)
            {
                this.lengthA[i] = input.ReadInt32();
            }
            if (((this.binaryArrayTypeEnum == BinaryArrayTypeEnum.SingleOffset) || (this.binaryArrayTypeEnum == BinaryArrayTypeEnum.JaggedOffset)) || (this.binaryArrayTypeEnum == BinaryArrayTypeEnum.RectangularOffset))
            {
                for (int j = 0; j < this.rank; j++)
                {
                    this.lowerBoundA[j] = input.ReadInt32();
                }
            }
            this.binaryTypeEnum = (BinaryTypeEnum) input.ReadByte();
            this.typeInformation = BinaryConverter.ReadTypeInfo(this.binaryTypeEnum, input, out this.assemId);
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:53,代码来源:BinaryArray.cs

示例3: Read

 public void Read(__BinaryParser input)
 {
     this.objectId = input.ReadInt32();
     this.name = input.ReadString();
     this.numMembers = input.ReadInt32();
     this.memberNames = new string[this.numMembers];
     for (int i = 0; i < this.numMembers; i++)
     {
         this.memberNames[i] = input.ReadString();
     }
     if (this.binaryHeaderEnum == BinaryHeaderEnum.ObjectWithMapAssemId)
     {
         this.assemId = input.ReadInt32();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:BinaryObjectWithMap.cs

示例4: Read

 public void Read(__BinaryParser input)
 {
     this.messageEnum = (MessageEnum) input.ReadInt32();
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.NoReturnValue))
     {
         this.returnValue = null;
     }
     else if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ReturnValueVoid))
     {
         this.returnValue = instanceOfVoid;
     }
     else if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ReturnValueInline))
     {
         this.returnValue = IOUtil.ReadWithCode(input);
     }
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ContextInline))
     {
         this.scallContext = (string) IOUtil.ReadWithCode(input);
         LogicalCallContext context = new LogicalCallContext {
             RemotingData = { LogicalCallID = this.scallContext }
         };
         this.callContext = context;
     }
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ArgsInline))
     {
         this.args = IOUtil.ReadArgs(input);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:BinaryMethodReturn.cs

示例5: ReadArgs

 internal static object[] ReadArgs(__BinaryParser input)
 {
     int num = input.ReadInt32();
     object[] objArray = new object[num];
     for (int i = 0; i < num; i++)
     {
         objArray[i] = ReadWithCode(input);
     }
     return objArray;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:IOUtil.cs

示例6: Read

 internal void Read(__BinaryParser input)
 {
     this.messageEnum = (MessageEnum) input.ReadInt32();
     this.methodName = (string) IOUtil.ReadWithCode(input);
     this.typeName = (string) IOUtil.ReadWithCode(input);
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ContextInline))
     {
         this.scallContext = (string) IOUtil.ReadWithCode(input);
         LogicalCallContext context = new LogicalCallContext {
             RemotingData = { LogicalCallID = this.scallContext }
         };
         this.callContext = context;
     }
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ArgsInline))
     {
         this.args = IOUtil.ReadArgs(input);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:18,代码来源:BinaryMethodCall.cs

示例7: Read

        public void Read(__BinaryParser input, BinaryHeaderEnum binaryHeaderEnum)
        {
            switch (binaryHeaderEnum)
            {
                case BinaryHeaderEnum.ObjectNull:
                    this.nullCount = 1;
                    return;

                case BinaryHeaderEnum.MessageEnd:
                case BinaryHeaderEnum.Assembly:
                    break;

                case BinaryHeaderEnum.ObjectNullMultiple256:
                    this.nullCount = input.ReadByte();
                    return;

                case BinaryHeaderEnum.ObjectNullMultiple:
                    this.nullCount = input.ReadInt32();
                    break;

                default:
                    return;
            }
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:24,代码来源:ObjectNull.cs

示例8: Read

 [System.Security.SecurityCritical] // implements Critical method
 public void Read(__BinaryParser input)
 {
     objectId = input.ReadInt32(); 
     mapId = input.ReadInt32();
 } 
开发者ID:wsky,项目名称:System.Runtime.Remoting,代码行数:6,代码来源:BinaryCommonClasses.cs

示例9: Read

        public void Read(__BinaryParser input)
        {
             messageEnum = (MessageEnum)input.ReadInt32();

             if (IOUtil.FlagTest(messageEnum, MessageEnum.NoReturnValue))
                 returnValue = null;
             else if (IOUtil.FlagTest(messageEnum, MessageEnum.ReturnValueVoid))
             {
                 returnValue = FormatterServices.GetUninitializedObject(Converter.typeofSystemVoid);            
             }
             else if (IOUtil.FlagTest(messageEnum, MessageEnum.ReturnValueInline))
                 returnValue = IOUtil.ReadWithCode(input);

             if (IOUtil.FlagTest(messageEnum, MessageEnum.ContextInline))
             {
                 scallContext = (String)IOUtil.ReadWithCode(input);
                 LogicalCallContext lcallContext = new LogicalCallContext();
                 lcallContext.RemotingData.LogicalCallID = scallContext;
                 callContext = lcallContext;
             }

             if (IOUtil.FlagTest(messageEnum, MessageEnum.ArgsInline))
                 args = IOUtil.ReadArgs(input);
        }
开发者ID:ArildF,项目名称:masters,代码行数:24,代码来源:binarycommonclasses.cs

示例10: ReadTypeInfo

        internal static object ReadTypeInfo(BinaryTypeEnum binaryTypeEnum, __BinaryParser input, out int assemId)
        {
            object obj2 = null;
            int num = 0;
            switch (binaryTypeEnum)
            {
                case BinaryTypeEnum.Primitive:
                case BinaryTypeEnum.PrimitiveArray:
                    obj2 = (InternalPrimitiveTypeE) input.ReadByte();
                    break;

                case BinaryTypeEnum.String:
                case BinaryTypeEnum.Object:
                case BinaryTypeEnum.ObjectArray:
                case BinaryTypeEnum.StringArray:
                    break;

                case BinaryTypeEnum.ObjectUrt:
                    obj2 = input.ReadString();
                    break;

                case BinaryTypeEnum.ObjectUser:
                    obj2 = input.ReadString();
                    num = input.ReadInt32();
                    break;

                default:
                    throw new SerializationException(Environment.GetResourceString("Serialization_TypeRead", new object[] { binaryTypeEnum.ToString() }));
            }
            assemId = num;
            return obj2;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:BinaryConverter.cs

示例11: Read

 public void Read(__BinaryParser input)
 {
     this.objectId = input.ReadInt32();
     this.value = input.ReadInt32();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:BinaryCrossAppDomainString.cs

示例12: ReadArgs

 internal static Object[] ReadArgs(__BinaryParser input)
 { 
     int length = input.ReadInt32();
     Object[] args = new Object[length];
     for (int i=0; i<length; i++)
         args[i] = ReadWithCode(input); 
     return args;
 } 
开发者ID:wsky,项目名称:System.Runtime.Remoting,代码行数:8,代码来源:BinaryCommonClasses.cs

示例13: ReadTypeInfo

        // Reads the type information from the wire
        internal static Object ReadTypeInfo(BinaryTypeEnum binaryTypeEnum, __BinaryParser input, out int assemId) 
        { 
            SerTrace.Log( "BinaryConverter", "ReadTypeInfo Entry  ",((Enum)binaryTypeEnum).ToString());
            Object var = null; 
            int readAssemId = 0;

            switch (binaryTypeEnum)
            { 
                case BinaryTypeEnum.Primitive:
                case BinaryTypeEnum.PrimitiveArray: 
                    var = (InternalPrimitiveTypeE)input.ReadByte(); 
                    break;
                case BinaryTypeEnum.String: 
                case BinaryTypeEnum.Object:
                case BinaryTypeEnum.StringArray:
                case BinaryTypeEnum.ObjectArray:
                    break; 
                case BinaryTypeEnum.ObjectUrt:
                    var = input.ReadString(); 
                    break; 
                case BinaryTypeEnum.ObjectUser:
                    var = input.ReadString(); 
                    readAssemId = input.ReadInt32();
                    break;
                default:
                    throw new SerializationException(Environment.GetResourceString("Serialization_TypeRead",((Enum)binaryTypeEnum).ToString())); 
            }
            SerTrace.Log( "BinaryConverter", "ReadTypeInfo Exit  ",var," assemId ",readAssemId); 
            assemId = readAssemId; 
            return var;
        } 
开发者ID:wsky,项目名称:System.Runtime.Remoting,代码行数:32,代码来源:BinaryCommonClasses.cs

示例14: Read

 public void Read(__BinaryParser input)
 {
     this.assemId = input.ReadInt32();
     this.assemblyString = input.ReadString();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:BinaryAssembly.cs

示例15: Read

 public void Read(__BinaryParser input)
 {
     this.idRef = input.ReadInt32();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:MemberReference.cs


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