예제 #1
0
 public void Remove(ITagRule TagRule)
 {
     //todo: .Contains verkar gå på ref och två likadana regler triggar inte dublettkollen i Vocabulary.Remove(TagRule).
     if (!TagRules.Contains(TagRule))
     {
         throw new Exception("Trying to remove tagrule ´" + TagRule + "' from Vocabulary in which it is not present.");
     }
     TagRules.Remove(TagRule);
 }
예제 #2
0
 public void Add(ITagRule TagRule)
 {
     //todo: .Contains verkar gå på ref och två likadana regler triggar inte dublettkollen i Vocabulary.Add(TagRule)
     if (TagRules.Contains(TagRule))
     {
         throw new Exception("Trying to add tagrule ´" + TagRule + "' to Vocabulary in which it already exist.");
     }
     TagRules.Add(TagRule);
 }