public static void Main() { UrlChecker checker = new UrlChecker("http://localhost:3000/form", "B:/Test.txt"); checker.Attach(new UrlObserver("localhostObserver")); checker.State = "New"; CareTaker careTaker = new CareTaker(); careTaker.Memento = checker.CreateMemento(); checker.Start(); Console.ReadKey(); }
public void Update(UrlChecker checker) { Console.WriteLine(Name + " : " + checker.UrlName + " has been modified"); }