Descriptor for a class defined in another module of THIS assembly and exported (.class extern)
Inheritance: MetaDataElement
Exemplo n.º 1
0
 /*----------------------------- internal functions ------------------------------*/
 internal void SetExternClass(ExternClass eClass)
 {
     externClass = eClass;
 }
Exemplo n.º 2
0
 internal void AddExternClass(ExternClass eClass)
 {
     exportedClasses.Add(eClass);
 }
Exemplo n.º 3
0
 internal static void Read(PEReader buff, TableRow[] eClasses)
 {
     for (int i=0; i < eClasses.Length; i++)
         eClasses[i] = new ExternClass(buff);
 }
Exemplo n.º 4
0
 /*------------------------- public set and get methods --------------------------*/
 /// <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 ClassRef AddExternClass(TypeAttr attrSet, string nsName,
     string name, bool isValueClass, PEFile pefile)
 {
     ClassRef cRef = new ClassRef(this,nsName,name);
     if (isValueClass) cRef.MakeValueClass();
     ExternClass eClass = new ExternClass(attrSet,nsName,name,modFile);
     exportedClasses.Add(eClass);
     cRef.SetExternClass(eClass);
     classes.Add(cRef);
     return cRef;
 }