public static  INameMatcher CreateMatcher(NameMatchType matchType, string name)
 {
     switch (matchType)
     {
         case NameMatchType.Exact: return new ExactNameMatcher(name);
         case NameMatchType.Contains: return new ContainsNameMatcher(name);
         case NameMatchType.Regex: return new RegexNameMatcher(name);
         default: throw new NotSupportedException(matchType.ToString());
     }
 }
Exemple #2
0
        public static INameMatcher CreateMatcher(NameMatchType matchType, string name)
        {
            switch (matchType)
            {
            case NameMatchType.Exact: return(new ExactNameMatcher(name));

            case NameMatchType.Contains: return(new ContainsNameMatcher(name));

            case NameMatchType.Regex: return(new RegexNameMatcher(name));

            default: throw new NotSupportedException(matchType.ToString());
            }
        }