private void initDomains(List <DomainPolicy> newDomains) { // Fast search allowedDomainsTrie = new Utils.Trie <DomainPolicy>(); foreach (DomainPolicy domain in newDomains) { allowedDomainsTrie.InsertDomain(domain); } _allDomains = newDomains; }
public static TrieNode <DomainPolicy> PostfixDomain(this Trie <DomainPolicy> t, string d) { return(t.Prefix(Reverse(d.ToLower()))); }
public static TrieNode <DomainPolicy> SearchDomain(this Trie <DomainPolicy> t, string d) { return(t.Search(Reverse(d.ToLower()))); }