Exemple #1
0
 public RuleSuppressionFilter(SuppressionOption option)
 {
     if (option == null || option.Count == 0)
     {
         _IsEmpty = true;
     }
     else
     {
         _Index = new HashSet <SuppressionKey>();
         Index(option);
     }
 }
Exemple #2
0
        private void Index(SuppressionOption option)
        {
            // Read suppress rules into index combined key (RuleName + TargetName)
            foreach (var rule in option)
            {
                foreach (var targetName in rule.Value.TargetName)
                {
                    var key = new SuppressionKey(rule.Key, targetName);

                    if (!_Index.Contains(key))
                    {
                        _Index.Add(key);
                    }
                }
            }
        }