internal ILReader(
   MethodDefinition methodDefinition,
   MethodIL methodIL
 ) {
   this.MethodDefinition = methodDefinition;
   this.PEFileToObjectModel = methodDefinition.PEFileToObjectModel;
   this.MethodIL = methodIL;
   this.MethodBody = new MethodBody(methodDefinition, methodIL.LocalVariablesInited, methodIL.MaxStack);
   this.EndOfMethodOffset = (uint)methodIL.EncodedILMemoryBlock.Length;
 }
 internal LocalVariableSignatureConverter(
   PEFileToObjectModel peFileToObjectModel,
   MethodBody owningMethodBody,
   MemoryReader signatureMemoryReader
 )
   : base(peFileToObjectModel, signatureMemoryReader, owningMethodBody.MethodDefinition) {
   this.OwningMethodBody = owningMethodBody;
   byte firstByte = this.SignatureMemoryReader.ReadByte();
   if (!SignatureHeader.IsLocalVarSignature(firstByte)) {
     //  MDError
   }
   int locVarCount = this.SignatureMemoryReader.ReadCompressedUInt32();
   LocalVariableDefinition[] locVarArr = new LocalVariableDefinition[locVarCount];
   for (int i = 0; i < locVarCount; ++i) {
     locVarArr[i] = this.GetLocalVariable((uint)i);
   }
   this.LocalVariables = locVarArr;
 }
예제 #3
0
     internal LocalVariableDefinition(
   MethodBody methodBody,
   EnumerableArrayWrapper<CustomModifier, ICustomModifier> customModifiers,
   bool isPinned,
   bool isReference,
   uint index,
   ITypeReference typeReference
 )
     {
         this.MethodBody = methodBody;
           this.CustomModifiers = customModifiers;
           this.IsPinned = isPinned;
           this.IsReference = isReference;
           this.Index = index;
           this.TypeReference = typeReference;
     }
 internal LocalVariableDefinition(MethodBody methodBody, IEnumerable<ICustomModifier>/*?*/ customModifiers, bool isPinned,
   bool isReference, uint index, ITypeReference typeReference) {
   this.methodBody = methodBody;
   this.customModifiers = customModifiers;
   this.isPinned = isPinned;
   this.isReference = isReference;
   this.index = index;
   this.typeReference = typeReference;
 }
예제 #5
0
     //^ [NotDelayed]
     internal LocalVariableSignatureConverter(
   PEFileToObjectModel peFileToObjectModel,
   MethodBody owningMethodBody,
   MemoryReader signatureMemoryReader
 )
         : base(peFileToObjectModel, signatureMemoryReader, owningMethodBody.MethodDefinition)
     {
         this.OwningMethodBody = owningMethodBody;
           //^ this.LocalVariables = ILReader.EmptyLocalVariables;
           //^ this.SignatureMemoryReader = signatureMemoryReader;
           //^ base;
           byte firstByte = this.SignatureMemoryReader.ReadByte();
           if (!SignatureHeader.IsLocalVarSignature(firstByte)) {
         //  MDError
           }
           int locVarCount = this.SignatureMemoryReader.ReadCompressedUInt32();
           LocalVariableDefinition[] locVarArr = new LocalVariableDefinition[locVarCount];
           for (int i = 0; i < locVarCount; ++i) {
         locVarArr[i] = this.GetLocalVariable((uint)i);
           }
           //^ NonNullType.AssertInitialized(locVarArr);
           this.LocalVariables = new EnumerableArrayWrapper<LocalVariableDefinition, ILocalDefinition>(locVarArr, Dummy.LocalVariable);
     }