Exemplo n.º 1
0
 public void AddMultiFilter(int i, string f)
 {
     if (MultiFilters == null)
     {
         MultiFilters = new Dictionary <int, HashSet <string> >();
     }
     if (!MultiFilters.TryGetValue(i, out var set))
     {
         set = new HashSet <string>();
         set.Add(f);
         MultiFilters[i] = set;
     }
     else
     {
         set.Add(f);
     }
 }
Exemplo n.º 2
0
        public void AddMultiFilter(int i, List <string> fs)
        {
            if (MultiFilters == null)
            {
                MultiFilters = new Dictionary <int, HashSet <string> >();
            }
            HashSet <string> set;

            if (!MultiFilters.TryGetValue(i, out set))
            {
                set             = new HashSet <string>(fs);
                MultiFilters[i] = set;
            }
            else
            {
                foreach (var f in fs)
                {
                    set.Add(f);
                }
            }
        }