using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Observer_GoF
{
    class Program
    {
        static void Main(string[] args)
        {
            // Configure Observer pattern
            ConcreteSubject s = new ConcreteSubject();
            s.Name = "Valérie";

            s.Attach(new ConcreteObserver(s, "Julie"));
            s.Attach(new ConcreteObserver(s, "Nicolas"));

            // Change subject and notify observers
            s.SubjectState = "I love Francois";

            // Wait for user
            Console.ReadKey();


        }
    }
 
    
}


