Exemple #1
0
        public SpamChecker()
        {
            firstSpamHandler = new DollarSignSpamHandler();
            var secondHandler     = new EmptyTextSpamHandler();
            var endOfChainHandler = new EndOfChainSpamHandler();

            firstSpamHandler.RegisterNext(secondHandler);
            secondHandler.RegisterNext(endOfChainHandler);
        }
Exemple #2
0
 public void RegisterNext(SpamHandler next)
 {
     NextSpamHandler = next;
 }