Exemple #1
0
        public static IEnumerable <MethodInfo> WhereNameMatches(this IEnumerable <MethodInfo> input, string name)
        {
            LinqUtility.CheckNotNull("input", input);
            LinqUtility.CheckNotNullOrEmpty("name", name);

            if (input.Count(mi => mi.Name == name) == 0)
            {
                throw new InvalidOperationException($"No suitable queryable method found for {name}");
            }

            return(input.Where(mi => mi.Name == name));
        }