Beispiel #1
0
		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;
		}
Beispiel #2
0
		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;
		}
Beispiel #3
0
		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);
		}
Beispiel #4
0
		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);
		}
Beispiel #5
0
		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;
		}
Beispiel #6
0
		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);
		}
Beispiel #7
0
		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);
		}
Beispiel #8
0
 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));
 }