public static AspectPredicate ForMethod(string service, string method) { if (service == null) { throw new ArgumentNullException(nameof(service)); } if (method == null) { throw new ArgumentNullException(nameof(method)); } return(methodInfo => ForService(service)(methodInfo) && methodInfo.Name.Matches(method)); }
public static AspectPredicate ForMethod(string service, string method) { if (service == null) { throw new ArgumentNullException("service"); } if (method == null) { throw new ArgumentNullException("method"); } return(delegate(MethodInfo methodInfo) { if (ForService(service)(methodInfo)) { return methodInfo.Name.Matches(method); } return false; }); }
public static InterceptPredicate ForMethod(string service, string method) { Arguments.NotNullOrEmpty(nameof(service), service); Arguments.NotNullOrEmpty(nameof(method), method); return(methodInfo => ForService(service)(methodInfo) && methodInfo.Name.Matches(method)); }