示例#1
0
        private TBox _FindMethod(MethodSearch search)
        {
            var bindingFlags = search.Context.AccessModifier.ToBindingFlags().Add(search.Context.MethodType.ToBindingFlags());
            var methodInfo   = search.Context.OwnerType.FoundMatchingType.GetMethods(bindingFlags).FindBestMatchingMethodInfo(search);

            return(BuildMethod(MethodBoxBuilderContext.Build(methodInfo, Options)).MethodInfoBox);
        }
示例#2
0
        public TBox RegisterMethod(MethodInfo methodInfo)
        {
            var box = BuildMethod(MethodBoxBuilderContext.Build(methodInfo, Options));

            return(_methodInfoBoxCache.Add(box));
        }