private AddToStringsHeap ( string str ) : uint | ||
str | string | |
return | uint |
internal FileRef(string name, byte[] hashBytes, bool metaData, bool entryPoint, MetaData md) { if (!metaData) flags = NoMetaData; if (entryPoint) md.SetEntryPoint(this); this.name = name; nameIx = md.AddToStringsHeap(name); hashIx = md.AddToBlobHeap(hashBytes); tabIx = MDTable.File; }
internal sealed override void BuildTables(MetaData md) { if (done) return; nameIx = md.AddToStringsHeap(name); done = true; }
internal sealed override void BuildTables(MetaData md) { if (done) return; nameIx = md.AddToStringsHeap(name); MemoryStream sig = new MemoryStream(); sig.WriteByte(FieldSig); type.TypeSig(sig); sigIx = md.AddToBlobHeap(sig.ToArray()); done = true; }
internal sealed override void BuildTables(MetaData md) { if (done) return; if (pinvokeImpl != null) { md.AddToTable(MDTable.ImplMap,pinvokeImpl); pinvokeImpl.BuildTables(md); } if (entryPoint) md.SetEntryPoint(this); uint locToken = 0; if (locals != null) { localSig = new LocalSig(locals); md.AddToTable(MDTable.StandAloneSig,localSig); localSig.BuildTables(md); locToken = localSig.Token(); } if (code != null) { code.CheckCode(locToken,initLocals,maxStack); textOffset = md.AddCode(code); } nameIx = md.AddToStringsHeap(name); sigIx = GetSigIx(md); parIx = md.TableIndex(MDTable.Param); if (ret_param.HasMarshalInfo || ret_param.HasCustomAttr) { md.AddToTable(MDTable.Param, ret_param); ret_param.BuildTables(md); } for (int i=0; i < numPars; i++) { md.AddToTable(MDTable.Param,parList[i]); parList[i].BuildTables(md); } if (varArgSigList != null) { foreach (MethodRef varArgSig in varArgSigList) { md.AddToTable(MDTable.MemberRef,varArgSig); varArgSig.BuildTables(md); } } // Console.WriteLine("method has " + numPars + " parameters"); done = true; }
internal sealed override void BuildTables(MetaData md) { if (done) return; nameIx = md.AddToStringsHeap(name); MemoryStream sig = new MemoryStream(); byte tag = PropertyTag; if (instance) tag |= 0x20; sig.WriteByte(tag); MetaData.CompressNum(numPars,sig); returnType.TypeSig(sig); for (int i=0; i < numPars; i++) { parList[i].TypeSig(sig); } typeBlobIx = md.AddToBlobHeap(sig.ToArray()); for (int i=0; i < tide; i++) { md.AddToTable(MDTable.MethodSemantics,methods[i]); } if (constVal != null) { md.AddToTable(MDTable.Constant,constVal); constVal.BuildTables(md); } done = true; }
internal sealed override void BuildTables(MetaData md) { if (done) return; nameIx = md.AddToStringsHeap(name); MemoryStream sig = new MemoryStream(); sig.WriteByte(FieldSig); type.TypeSig(sig); sigIx = md.AddToBlobHeap(sig.ToArray()); if (rva != null) { md.AddToTable(MDTable.FieldRVA,rva); rva.BuildTables(md); } else if (constVal != null) { md.AddToTable(MDTable.Constant,constVal); constVal.BuildTables(md); } if (layout != null) md.AddToTable(MDTable.FieldLayout,layout); if (marshalInfo != null) { md.AddToTable(MDTable.FieldMarshal,marshalInfo); marshalInfo.BuildTables(md); } done = true; }
internal sealed override void BuildTables(MetaData md) { if (done) return; nameIx = md.AddToStringsHeap(name); for (int i=0; i < tide; i++) { md.AddToTable(MDTable.MethodSemantics,methods[i]); } done = true; }
internal ResolutionScope(string name, MetaData md) { metaData = md; this.name = name; nameIx = md.AddToStringsHeap(name); }
internal Class(string nameSpaceName, string className, MetaData md) : base(PrimitiveType.Class.GetTypeIndex ()) { nameSpace = nameSpaceName; name = className; nameIx = md.AddToStringsHeap(name); nameSpaceIx = md.AddToStringsHeap(nameSpace); _metaData = md; }
internal sealed override void BuildTables(MetaData md) { if (done) return; nameIx = md.AddToStringsHeap(pName); if (defaultVal != null) { md.AddToTable(MDTable.Constant,defaultVal); defaultVal.BuildTables(md); } if (marshalInfo != null) { md.AddToTable(MDTable.FieldMarshal,marshalInfo); marshalInfo.BuildTables(md); } done = true; }
internal sealed override void BuildTables(MetaData md) { if (done) return; md.AddToTable (MDTable.ManifestResource, this); nameIx = md.AddToStringsHeap(mrName); if (resourceBytes != null) { if (rRef != null) throw new PEFileException ("Manifest Resource has byte value and file reference"); fileOffset = md.AddResource(resourceBytes); } else { if (rRef == null) throw new PEFileException ("Manifest Resource has no implementation or value"); rRef.BuildTables (md); } done = true; }