Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var tSwift = new TSwift("1981 is now my favorite number.");

            var firstFan  = new Fan("John");
            var secondFan = new Fan("Kate");

            tSwift.AddFollower(firstFan);
            tSwift.AddFollower(secondFan);

            tSwift.Tweet = "I love my new music.";

            Console.Read();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var celebrity = new Aravind("Coding is fun");

            var fan1 = new Fan("fan1");
            var fan2 = new Fan("fan2");

            celebrity.AddFollower(fan1);
            celebrity.AddFollower(fan2);

            celebrity.Tweet = "I have implemented the observer pattern successfully";

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var gClooney = new GClooney("I love my new wife");
            var tSwift   = new TSwift("1981 is now my favorite number.");

            var firstFan  = new Fan();
            var secondFan = new Fan();

            gClooney.AddFollower(firstFan);
            tSwift.AddFollower(secondFan);

            gClooney.Tweet = "My wife didn't force me to tweet.";
            tSwift.Tweet   = "I love my new music.";

            Console.Read();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            var witcher = new HenryCavill("Hmmm...");
            var ciri    = new Ciri("Mam dla ciebie niespodziankę.");

            var firstFan  = new Fan();
            var secondFan = new Fan();

            witcher.AddFollower(firstFan);
            ciri.AddFollower(secondFan);

            witcher.Tweet = "Wole nie wybierać wcale...";
            ciri.Tweet    = "Lecę, bo chcę.";

            Console.Read();
        }
Ejemplo n.º 5
0
 public void AcceptRequest(Fan fan)
 {
     FanFollowing.Add(fan);
 }