예제 #1
0
파일: HLType.cs 프로젝트: Astaelan/Neutron
 internal void BuildVirtualTable()
 {
     if (VirtualTableBuilt)
     {
         return;
     }
     mVirtualTableBuilt = true;
     if (BaseType != null)
     {
         BaseType.BuildVirtualTable();
         VirtualTable.AddRange(BaseType.VirtualTable);
         foreach (KeyValuePair <HLMethod, int> kv in BaseType.VirtualLookup)
         {
             VirtualLookup.Add(kv.Key, kv.Value);
         }
         foreach (KeyValuePair <HLMethod, HLMethod> kv in VirtualMap.Where(p => p.Key.Container != this))
         {
             int index = VirtualLookup[kv.Key];
             VirtualTable[index] = kv.Value;
         }
     }
     foreach (KeyValuePair <HLMethod, HLMethod> kv in VirtualMap.Where(p => p.Key.Container == this))
     {
         int index = VirtualTable.Count;
         VirtualTable.Add(kv.Value);
         VirtualLookup.Add(kv.Key, index);
     }
 }