Exemple #1
0
 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);
         }
     }
 }
Exemple #2
0
 public override void ProcessRequest(Mail mail)
 {
     Console.WriteLine("[TO: {0}]\t{1}", "pr", mail.body);
     Archives.Instance().archive(mail);
 }