Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 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;
     }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 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);
     }