예제 #1
0
 protected void Add(ISwear swear)
 {
     if      (swear is RegexSwear)     regexSwearList.Add(swear as RegexSwear);
     else if (swear is LongSwearWord)  longSwearWordList.Add(swear as LongSwearWord);
     else if (swear is ShortSwearWord) shortSwearWordList.Add(swear as ShortSwearWord);
     else if (swear is SwearComposite) {
         foreach (ISwear sw in ((SwearComposite)swear)) {
             Add(sw);
         }
     }
 }
예제 #2
0
 protected void Add(ISwear swear)
 {
     if (swear is RegexSwear)
     {
         regexSwearList.Add(swear as RegexSwear);
     }
     else if (swear is LongSwearWord)
     {
         longSwearWordList.Add(swear as LongSwearWord);
     }
     else if (swear is ShortSwearWord)
     {
         shortSwearWordList.Add(swear as ShortSwearWord);
     }
     else if (swear is SwearComposite)
     {
         foreach (ISwear sw in ((SwearComposite)swear))
         {
             Add(sw);
         }
     }
 }