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); }
public TBox RegisterMethod(MethodInfo methodInfo) { var box = BuildMethod(MethodBoxBuilderContext.Build(methodInfo, Options)); return(_methodInfoBoxCache.Add(box)); }