示例#1
0
文件: Type.cs 项目: ngraziano/mono
		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;
		}
示例#2
0
文件: Type.cs 项目: ngraziano/mono
		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;
		}
示例#3
0
文件: Type.cs 项目: ngraziano/mono
		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);
		}
示例#4
0
文件: Type.cs 项目: ngraziano/mono
		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);
		}
示例#5
0
文件: Type.cs 项目: ngraziano/mono
		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;
		}
示例#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);
		}
示例#7
0
文件: Module.cs 项目: nestalk/mono
		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);
		}
示例#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));
 }