Example #1
0
        static void Main(string[] args)
        {
            var emily = new Tweeter();

            var worshiperOfAllThingsEmily = new Follower(emily);
            var iWantToBeJustLikeEmilyWhenIGrowUp = new Follower(emily);
            var ardentFollowerOfEmily = new Follower(emily);

            emily.Tweet = new Tweet
            {
                Author = "Emily",
                PublicationTime = DateTime.Now,
                Text = "Words of great wisdom"
            };

            Console.ReadLine();
        }
Example #2
0
        static void Main()
        {
            var topic = new InterestingTopic();

            var follower1 = new Follower("f1");
            var follower2 = new Follower("f2");
            var follower3 = new Follower("f3");

            topic.Attach(follower1);
            topic.Attach(follower2);
            topic.Attach(follower3);

            topic.Posts.Add("Hello everybody!");
            topic.Notify();

            Console.ReadLine();
        }
Example #3
0
        static void Main(string[] args)
        {
            var emily = new Tweeter();

            var worshiperOfAllThingsEmily         = new Follower(emily);
            var iWantToBeJustLikeEmilyWhenIGrowUp = new Follower(emily);
            var ardentFollowerOfEmily             = new Follower(emily);

            emily.Tweet = new Tweet
            {
                Author          = "Emily",
                PublicationTime = DateTime.Now,
                Text            = "Words of great wisdom"
            };

            Console.ReadLine();
        }