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); } }