public InterfaceMethodInfo(TypeInfo iface, InterfaceMethodInfo other) { this.iface = iface; foreach (var key in other.ifaceMethodToClassMethod.Keys) { ifaceMethodToClassMethod[key] = other.ifaceMethodToClassMethod[key]; } }
public void AddInterface(TypeInfo iface) { var key = iface.typeRef; if (!interfaceMethods.ContainsKey(key)) { interfaceMethods[key] = new InterfaceMethodInfo(iface); } }
public void Merge(InterfaceMethodInfo other) { foreach (var key in other.ifaceMethodToClassMethod.Keys) { if (other.ifaceMethodToClassMethod[key] == null) { continue; } if (ifaceMethodToClassMethod[key] != null) { throw new ApplicationException("Interface method already initialized"); } ifaceMethodToClassMethod[key] = other.ifaceMethodToClassMethod[key]; } }
public void InitializeFrom(InterfaceMethodInfos other, GenericInstSig git) { foreach (var pair in other.interfaceMethods) { var oldTypeInfo = pair.Value.IFace; var newTypeInfo = new TypeInfo(oldTypeInfo, git); var oldKey = oldTypeInfo.typeRef; var newKey = newTypeInfo.typeRef; InterfaceMethodInfo newMethodsInfo = new InterfaceMethodInfo(newTypeInfo, other.interfaceMethods[oldKey]); if (interfaceMethods.ContainsKey(newKey)) { newMethodsInfo.Merge(interfaceMethods[newKey]); } interfaceMethods[newKey] = newMethodsInfo; } }
public void merge(InterfaceMethodInfo other) { foreach (var key in other.ifaceMethodToClassMethod.Keys) { if (other.ifaceMethodToClassMethod[key] == null) continue; if (ifaceMethodToClassMethod[key] != null) throw new ApplicationException("Interface method already initialized"); ifaceMethodToClassMethod[key] = other.ifaceMethodToClassMethod[key]; } }
public InterfaceMethodInfo(TypeInfo iface, InterfaceMethodInfo other) { this.iface = iface; foreach (var key in other.ifaceMethodToClassMethod.Keys) ifaceMethodToClassMethod[key] = other.ifaceMethodToClassMethod[key]; }
public void initializeFrom(InterfaceMethodInfos other, GenericInstanceType git) { foreach (var pair in other.interfaceMethods) { var oldTypeInfo = pair.Value.IFace; var newTypeInfo = new TypeInfo(oldTypeInfo, git); var oldKey = new TypeReferenceKey(oldTypeInfo.typeReference); var newKey = new TypeReferenceKey(newTypeInfo.typeReference); InterfaceMethodInfo newMethodsInfo = new InterfaceMethodInfo(newTypeInfo, other.interfaceMethods[oldKey]); if (interfaceMethods.ContainsKey(newKey)) newMethodsInfo.merge(interfaceMethods[newKey]); interfaceMethods[newKey] = newMethodsInfo; } }
public void addInterface(TypeInfo iface) { var key = new TypeReferenceKey(iface.typeReference); if (!interfaceMethods.ContainsKey(key)) interfaceMethods[key] = new InterfaceMethodInfo(iface); }