ここにクラスの説明を書きます。
Beispiel #1
0
 public void MakeTree(PEData data)
 {
     ArrayList listType = this.Tables[(int) MetadataTables.TypeDef];
     int len = listType.Count;
     for (int i = 0; i < len; i++)
     {
         this.MakeTree(listType[i] as TypeDefTable, i + 1 < len ? listType[i + 1] as TypeDefTable : null);
     }
     foreach (object obj in this.Tables[(int) MetadataTables.AssemblyRef])
     {
         (obj as TableBase).Children = new ArrayList[]
         {
             new ArrayList()
         }
         ;
     }
     foreach (object obj in this.Tables[(int) MetadataTables.TypeRef])
     {
         (obj as TableBase).Children = new ArrayList[]
         {
             new ArrayList(), new ArrayList(), new ArrayList()
         }
         ;
     }
     foreach (object obj in this.Tables[(int) MetadataTables.TypeRef])
     {
         TypeRefTable t = obj as TypeRefTable;
         if (t.ResolutionScope == 0) continue;
         t.ParentTable = this.GetTable(this.GetToken(CodedIndices.ResolutionScope, t.ResolutionScope));
         t.ParentTable.Children[(int) Children.RefNested].Add(t);
     }
     foreach (object obj in this.Tables[(int) MetadataTables.MethodDef])
     {
         MethodDefTable m = obj as MethodDefTable;
         m.Tag = new MethodData(data, m);
     }
     foreach (object obj in this.Tables[(int) MetadataTables.MemberRef])
     {
         MemberRefTable m = obj as MemberRefTable;
         MethodData md = new MethodData(data, m);
         m.Tag = md;
         if (m.Class == 0) continue;
         m.ParentTable = this.GetTable(this.GetToken(CodedIndices.MemberRefParent, m.Class));
         if (md.IsField)
         {
             m.ParentTable.Children[(int) Children.RefField].Add(m);
         }
         else
         {
             m.ParentTable.Children[(int) Children.RefMethod].Add(m);
         }
     }
     foreach (object obj in this.Tables[(int) MetadataTables.ImplMap])
     {
         ImplMapTable im = obj as ImplMapTable;
         MethodDefTable m = this.GetTable(this.GetToken(CodedIndices.MemberForwarded, im.MemberForwarded)) as MethodDefTable;
         if (m != null) (m.Tag as MethodData).ImplMap = im;
     }
     foreach (object obj in this.Tables[(int) MetadataTables.NestedClass])
     {
         NestedClassTable nc = obj as NestedClassTable;
         TypeDefTable nst = listType[nc.NestedClass - 1] as TypeDefTable;
         TypeDefTable enc = listType[nc.EnclosingClass - 1] as TypeDefTable;
         nst.ParentTable = enc;
         enc.Children[(int) Children.DefNested].Add(nst);
     }
 }