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); } } }
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); } } }