/// <summary> /// Internal use only /// </summary> /// <param name="file"></param> /// <param name="item"></param> /// <param name="parrent"></param> public DotNetMethod(PEParaser file, MethodTabelRow item, DotNetType parrent, uint nextMethod) { this.file = file; this.method = item; this.Parrent = parrent; this.flags = (MethodAttr)item.Flags; this.nextMethod = nextMethod; this.Signature = file.ClrStringsStream.GetByOffset(item.Signature); this.Name = file.ClrStringsStream.GetByOffset(item.Name); }
public DotNetField(PEFile file, Field backend, DotNetType parrent, int indexintable) { this.file = file; this.ParrentType = parrent; this.BackendTabel = backend; this.IndexInTabel = indexintable; flags = (FieldAttribs)BackendTabel.Flags; Name = file.ClrStringsStream.GetByOffset(backend.Name); //Read the field info in blob stream var b = new BinaryReader(new MemoryStream(file.BlobStream)); b.BaseStream.Position = backend.Signature; var size = b.ReadByte(); var prolog = b.ReadByte(); ValueType = ReadParam(b, parrent.File); }
/// <summary> /// Internal use only /// </summary> /// <param name="file"></param> /// <param name="item"></param> /// <param name="parrent"></param> public DotNetMethod(PEFile file, Method item, DotNetType parrent) { this.file = file; this.BackendTabel = item; this.Parent = parrent; this.flags = (MethodAttr)item.Flags; this.implFlags = (MethodImp)item.ImplFlags; this.file2 = parrent.File; ParamListIndex = item.ParamList; this.Name = file.ClrStringsStream.GetByOffset(item.Name); //method signatures SignatureInfo = ParseMethodSignature(item.Signature, File, this.Name); this.Signature = SignatureInfo.Signature; this.AmountOfParms = SignatureInfo.AmountOfParms; Parms = SignatureInfo.Params; this.HasThis = SignatureInfo.HasThis; if (SignatureInfo.ReturnVal.type != StackItemType.None) { HasReturnValue = true; } }