Exemplo n.º 1
0
        public List <HostsItem> GetMatched(string pattern, Func <HostsItem, bool> check = null)
        {
            var wp = new WildcardPattern(pattern);

            return(this.GetValid().FindAll(item => item.Aliases.IsMatch(wp) && (check == null ? true : check(item))));
        }
Exemplo n.º 2
0
 public bool IsMatch(WildcardPattern pattern)
 {
     return(this.Exists(item => pattern.IsMatch(item.Unicode)));
 }