protected void process(Mail mail, string[] keywords, string towho) { if (contains(mail.body, keywords)) { Console.WriteLine("[TO: {0}]\t{1}", towho, mail.body); Archives.Instance().archive(mail); } else { if (next != null) { next.ProcessRequest(mail); } } }
public override void ProcessRequest(Mail mail) { Console.WriteLine("[TO: {0}]\t{1}", "pr", mail.body); Archives.Instance().archive(mail); }