예제 #1
0
        private void initDomains(List <DomainPolicy> newDomains)
        {
            // Fast search

            allowedDomainsTrie = new Utils.Trie <DomainPolicy>();
            foreach (DomainPolicy domain in newDomains)
            {
                allowedDomainsTrie.InsertDomain(domain);
            }

            _allDomains = newDomains;
        }
예제 #2
0
 public static TrieNode <DomainPolicy> PostfixDomain(this Trie <DomainPolicy> t, string d)
 {
     return(t.Prefix(Reverse(d.ToLower())));
 }
예제 #3
0
 public static TrieNode <DomainPolicy> SearchDomain(this Trie <DomainPolicy> t, string d)
 {
     return(t.Search(Reverse(d.ToLower())));
 }