private GenericBindingContext(GenericInstanceMethod method) { var definition = method.Resolve(); for (int i = 0; i < definition.GenericParameters.Count; ++i) { var parameter = definition.GenericParameters[i]; var binding = method.GenericArguments[i]; _methodEntries.Add(new Entry(parameter.FullName, binding)); } }
public static GenericInstanceMethod InflateMethod(GenericContext context, GenericInstanceMethod genericInstanceMethod) { GenericInstanceType declaringType = genericInstanceMethod.DeclaringType as GenericInstanceType; TypeReference reference = (declaringType == null) ? InflateType(context, genericInstanceMethod.DeclaringType) : InflateType(context, declaringType); return ConstructGenericMethod(context, reference, genericInstanceMethod.Resolve(), genericInstanceMethod.GenericArguments); }