Ejemplo n.º 1
0
 internal override void Resolve(PEReader buff)
 {
     buff.currentClassScope = this;
     superType = (Class)buff.GetCodedElement(CIx.TypeDefOrRef, extendsIx);
     if ((superType != null) && superType.isValueType())
         typeIndex = (byte)ElementType.ValueType;
     for (int i = 0; fieldIx < fieldEndIx; i++, fieldIx++)
     {
         FieldDef field = (FieldDef)buff.GetElement(MDTable.Field, fieldIx);
         field.SetParent(this);
         fields.Add(field);
     }
     for (int i = 0; methodIx < methodEndIx; i++, methodIx++)
     {
         MethodDef meth = (MethodDef)buff.GetElement(MDTable.Method, methodIx);
         if (Diag.DiagOn) Console.WriteLine("Adding method " + meth.Name() + " to class " + Name);
         meth.SetParent(this);
         methods.Add(meth);
     }
     buff.currentClassScope = null;
 }