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

namespace Observer_GoF
{
   /// <summary>
    /// The 'ConcreteObserver' class
    /// </summary>
    class ConcreteObserver : Observer
    {
        
        private ConcreteSubject _subject;

        public string Name { get; set; }

        // Constructor
        public ConcreteObserver(
            ConcreteSubject subject,string name)
        {
            this._subject = subject;
            this.Name = name;
        }

        public override void Update()
        {
            Console.WriteLine("Observer:{0} -- new tweet from {1} is {2}",
                Name, _subject.Name,_subject.SubjectState);
        }

    }
}

