public PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) { PropertyInfo found = null; foreach (PropertyInfo prop in GetProperties(bindingAttr)) { if (prop.Name == name && prop.PropertyType.Equals(returnType) && MatchParameterTypes(prop.GetIndexParameters(), types)) { if (found != null) { throw new AmbiguousMatchException(); } found = prop; } } return found; }
public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) { foreach (ConstructorInfo constructor in GetConstructors(bindingAttr)) { if (constructor.MethodSignature.MatchParameterTypes(types)) { return constructor; } } return null; }
public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, CallingConventions callingConvention, Type[] types, ParameterModifier[] modifiers) { // FXBUG callConvention seems to be ignored return GetConstructor(bindingAttr, binder, types, modifiers); }
public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { // FXBUG callConvention seems to be ignored return GetMethod(name, bindingAttr, binder, types, modifiers); }
public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) { MethodInfo found = null; foreach (MethodInfo method in GetMethods(bindingAttr)) { if (method.Name == name && method.MethodSignature.MatchParameterTypes(types)) { if (found != null) { throw new AmbiguousMatchException(); } found = method; } } return found; }
internal MethodSignature Bind(Type type, Type[] methodArgs) { Binder binder = new Binder(type, methodArgs); return new MethodSignature(returnType.BindTypeParameters(binder), BindTypeParameters(binder, parameterTypes), BindTypeParameters(binder, modifiers), callingConvention, genericParamCount); }
public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers) { return IsResource() ? null : GetModuleType().GetMethod(name, bindingAttr | BindingFlags.DeclaredOnly, binder, callConv, types, modifiers); }
public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers) { return(IsResource() ? null : GetModuleType().GetMethod(name, bindingAttr | BindingFlags.DeclaredOnly, binder, callConv, types, modifiers)); }