예제 #1
0
        public void Run()
        {
            var subject = new ConcreteSubject();
            subject.Attach(new ConcreteObserver("Observer 1", subject));
            subject.Attach(new ConcreteObserver("Observer 2", subject));
            subject.Attach(new ConcreteObserver("Observer 3", subject));

            subject.State = "Hello World";
            subject.State = "abc";
        }