System.Linq.Dynamic.ExpressionParser.GetAppropriateMethodCount C# (CSharp) Method

GetAppropriateMethodCount() private method

private GetAppropriateMethodCount ( Type type, string methodName, bool staticAccess, Expression args, MethodBase &method ) : int
type Type
methodName string
staticAccess bool
args Expression
method MethodBase
return int
		private int GetAppropriateMethodCount(Type type, string methodName, bool staticAccess, Expression[] args, out MethodBase method)
		{
			BindingFlags flags = BindingFlags.Public | BindingFlags.DeclaredOnly | (staticAccess ? BindingFlags.Static : BindingFlags.Instance)
				| BindingFlags.IgnoreCase;

			foreach (MemberInfo[] members in SelfAndBaseTypes(type).Select(t => t.GetMethods(flags)))
			{
				int count = FindBestMethod(members.Cast<MethodBase>(), methodName, args, out method);
				if (count != 0) return count;
			}
			method = null;
			return 0;
		}
ExpressionParser