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)))); }
public bool IsMatch(WildcardPattern pattern) { return(this.Exists(item => pattern.IsMatch(item.Unicode))); }