Пример #1
0
        // The Client
        static void Demo()
        {
            MySpaceBook me = new MySpaceBook();
            me.Add("Hello world");
            me.Add("Today I worked 18 hours");

            MySpaceBook tom = new MySpaceBook();
            tom.Poke("Judith");
            tom.Add("Judith", "Poor you");
            tom.Add("Off to see the Lion King tonight");
        }
Пример #2
0
        public static void Main()
        {
            MySpaceBook me = new MySpaceBook();
            me.Add("Hello World");
            me.Add("Today I worked 18 hours.");

            MySpaceBook tom = new MySpaceBook();
            tom.Poke("Judith");
            tom.MessageFriend("Judith", "Poor you");
            tom.Add("Off to see the Lion King tonight");
        }
Пример #3
0
            static void Main()
            {
                MySpaceBook me = new MySpaceBook();

                me.Add("Hello world");
                me.Add("Today I worked 18 hours");
                MySpaceBook tom = new MySpaceBook();

                tom.Poke("Judith"); //Judith is a name of alredy registered SpaceBook
                tom.Add("Judith", "Poor you");
                tom.Add("Off to see the Lion King tonight");
            }
Пример #4
0
        public static void Main()
        {
            MySpaceBook me = new MySpaceBook();

            me.Add("Hello World");
            me.Add("Today I worked 18 hours.");

            MySpaceBook tom = new MySpaceBook();

            tom.Poke("Judith");
            tom.MessageFriend("Judith", "Poor you");
            tom.Add("Off to see the Lion King tonight");
        }
Пример #5
0
        public void Main()
        {
            var me = new MySpaceBook();

            me.Add("Hello world");
            me.Add("Today I worked 18 hours");

            var tom = new MySpaceBook();

            tom.Poke("Judith");
            tom.Add("Judith", "Poor you");
            tom.Add("Off to see the Lion King tonight");
        }
Пример #6
0
        static void Main(string[] args)
        {
            //Note!!!
            // To work correctly the first user is:  Judith
            // and the next registration will be : Tom


            MySpaceBook me = new MySpaceBook();

            me.Add("Hello world");
            me.Add("Today I worked 18 hours");
            MySpaceBook tom = new MySpaceBook();

            tom.Poke("Judith");
            tom.Add("Judith", "Poor you");
            tom.Add("Off to see the Lion King tonight");
        }
        static void Main()
        {
            MySpaceBook me = new MySpaceBook();

            me.Add("Hello world");
            me.Add("Today I worked 18 hours");

            MySpaceBook tom = new MySpaceBook();

            tom.Poke("Judith");  //will NOT pass
            tom.AddFriend("Judith");
            me.AcceptRequests(); // accepts as judith
            tom.Poke("Judith");  // will pass

            tom.Add("Judith", "Poor you");
            tom.Add("Off to see the Lion King tonight");
            Console.ReadKey();
        }
    public static void Run()
    {
        Console.WriteLine("SpaceBook Proxy example.");
        Console.WriteLine();

        MySpaceBook me = new MySpaceBook();

        me.Add("Hello world");
        me.Add("Today I worked 18 hours");
        MySpaceBook tom = new MySpaceBook();

        tom.Poke("Judith");
        tom.Add("Judith", "Poor you");
        tom.Add("Off to see the Lion King tonight");

        Console.WriteLine();
        Console.WriteLine("******************************************");
        Console.WriteLine();
    }