// Returns the previous method, or null if none public MethodDef addMethod(MethodDef ifaceMethod, MethodDef classMethod) { if (!ifaceMethodToClassMethod.ContainsKey(ifaceMethod)) throw new ApplicationException("Could not find interface method"); MethodDef oldMethod; ifaceMethodToClassMethod.TryGetValue(ifaceMethod, out oldMethod); ifaceMethodToClassMethod[ifaceMethod] = classMethod; return oldMethod; }
public void addMethodIfEmpty(MethodDef ifaceMethod, MethodDef classMethod) { if (ifaceMethodToClassMethod[ifaceMethod] == null) addMethod(ifaceMethod, classMethod); }
public void add(MethodDef m) { methods.add(m); }
public void addMethodIfEmpty(TypeInfo iface, MethodDef ifaceMethod, MethodDef classMethod) { InterfaceMethodInfo info; var key = new TypeReferenceKey(iface.typeReference); if (!interfaceMethods.TryGetValue(key, out info)) throw new ApplicationException("Could not find interface"); info.addMethodIfEmpty(ifaceMethod, classMethod); }
public MethodInst(MethodDef origMethodDef, MethodReference methodReference) { this.origMethodDef = origMethodDef; this.methodReference = methodReference; }
// Returns the previous classMethod, or null if none public MethodDef addMethod(TypeInfo iface, MethodDef ifaceMethod, MethodDef classMethod) { return addMethod(iface.typeReference, ifaceMethod, classMethod); }
public void add(MethodDef method) { methods.Add(method); }
public void same(MethodDef a, MethodDef b) { merge(get(a), get(b)); }
public MethodNameScope get(MethodDef method) { if (!method.isVirtual()) throw new ApplicationException("Not a virtual method"); MethodNameScope scope; if (!methodScopes.TryGetValue(method, out scope)) { methodScopes[method] = scope = new MethodNameScope(); scope.add(method); } return scope; }
public void add(MethodDef methodDef) { get(methodDef); }