/// <summary> /// Add a class which is declared public in this external module of /// THIS assembly. This class will be exported from this assembly. /// The ilasm syntax for this is .extern class /// </summary> /// <param name="attrSet">attributes of the class to be exported</param> /// <param name="nsName">name space name</param> /// <param name="name">external class name</param> /// <param name="declFile">the file where the class is declared</param> /// <param name="isValueClass">is this class a value type?</param> /// <returns>a descriptor for this external class</returns> public ExternClassRef AddExternClass(TypeAttr attrSet, string nsName, string name, FileRef declFile, bool isValueClass) { ExternClassRef cRef = new ExternClassRef(attrSet,nsName,name,declFile,metaData); metaData.AddToTable(MDTable.TypeRef,cRef); cRef.SetParent(this); if (isValueClass) cRef.MakeValueClass(ValueClass.ValueType); return cRef; }
/// <summary> /// Make a file descriptor to correspond to this module. The file /// descriptor will have the same name as the module descriptor /// </summary> /// <param name="hashBytes">the hash of the file</param> /// <param name="hasMetaData">the file contains metadata</param> /// <param name="entryPoint">the program entry point is in this file</param> /// <returns>a descriptor for the file which contains this module</returns> public FileRef MakeFile(byte[] hashBytes, bool hasMetaData, bool entryPoint) { FileRef file = new FileRef(nameIx,hashBytes,hasMetaData,entryPoint,metaData); metaData.AddToTable(MDTable.File,file); return file; }
internal ExternClassRef(TypeAttr attrs, string nsName, string name, FileRef declFile, MetaData md) : base(nsName,name,md) { externClass = new ExternClass(attrs,nameSpaceIx,nameIx,declFile); metaData.AddToTable(MDTable.ExportedType,externClass); }
public ManifestResource(string name, uint flags, FileRef fileRef, uint fileIx) { InitResource (name, flags); rRef = fileRef; fileOffset = fileIx; }
public ManifestResource(string name, uint flags, FileRef fileRef) { InitResource (name, flags); rRef = fileRef; }
public FileRef AddFile(string fName, byte[] hashBytes, bool hasMetaData, bool entryPoint) { FileRef file = new FileRef(fName,hashBytes,hasMetaData,entryPoint,metaData); metaData.AddToTable(MDTable.File,file); return file; }