public override void HandleRequest(ILetter letter) { BayesSpamFilter bayesSpamFilter = BayesSpamFilter.GetInstance(); if (bayesSpamFilter.BayesFilter()) { letter.SetCategories(true); return; } else if (successor != null) { successor.HandleRequest(letter); } }
public override void HandleRequest(ILetter letter) { List <string> lines = File.ReadAllLines("badAddress.txt", Encoding.GetEncoding(1251)).ToList(); foreach (string component in lines) { if (component == letter.GetSender()) { letter.SetCategories(true); return; } } if (successor != null) { successor.HandleRequest(letter); } }
public abstract void HandleRequest(ILetter letter);
public void Remove(ILetter component) { messages.Remove(component); }
public void Add(ILetter component) { messages.Add(component); }