/// <summary> /// Creates a new <see cref="MethodSignatureMatchingRule"/> that matches methods /// with the given name, with parameter types matching the given list. /// </summary> /// <param name="methodName">Method name to match. Wildcards are allowed.</param> /// <param name="parameterTypeNames">Parameter type names to match, in order. Wildcards are allowed.</param> /// <param name="ignoreCase">If false, name comparisons are case sensitive. If true, name comparisons are case insensitive.</param> public MethodSignatureMatchingRule(string methodName, IEnumerable<string> parameterTypeNames, bool ignoreCase) { methodNamePattern = new Glob(methodName, !ignoreCase); parameterRules = new List<TypeMatchingRule>(); foreach (string parameterTypeName in parameterTypeNames) { parameterRules.Add(new TypeMatchingRule(parameterTypeName, ignoreCase)); } }
public MethodSignatureMatchingRule(string methodName, IEnumerable<string> parameterTypeNames, bool ignoreCase) { Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(parameterTypeNames, "parameterTypeNames"); methodNamePattern = new Glob(methodName, !ignoreCase); parameterRules = new List<TypeMatchingRule>(); foreach (string parameterTypeName in parameterTypeNames) { parameterRules.Add(new TypeMatchingRule(parameterTypeName, ignoreCase)); } }