Example #1
0
        private static Func <string, string, string[]> GetGetFilesFunction()
        {
            var func14 = FileMatcher.GetMethod("GetFiles", BindingFlags.NonPublic | BindingFlags.Static, null, new[] { typeof(string), typeof(string) }, new ParameterModifier[0]);

            if (func14 != null)
            {
                return((Func <string, string, string[]>)func14.CreateDelegate(typeof(Func <string, string, string[]>)));
            }
            var func15 = FileMatcher.GetMethod("GetFiles", BindingFlags.NonPublic | BindingFlags.Static, null, new[] { typeof(string), typeof(string), typeof(IEnumerable <string>) }, new ParameterModifier[0]);

            if (func15 != null)
            {
                var f = (Func <string, string, IEnumerable <string>, string[]>)func15.CreateDelegate(typeof(Func <string, string, IEnumerable <string>, string[]>));
                return((a, b) => f(a, b, Enumerable.Empty <string>()));
            }
            throw new MissingMethodException("Could not find FileMatcher.GetFiles");
        }