Пример #1
0
        static void Main(string[] args)
        {
            //=======================================
            ProxyImage proxyImage = new ProxyImage("http://abc.com/a.png");

            Console.WriteLine("Call real service 1st: ");
            proxyImage.ShowImage();

            Console.WriteLine("Call real service 2nd: ");
            proxyImage.ShowImage();

            //=======================================

            /*UserProxy user1 = new UserProxy("user1", "admin");
             * Console.WriteLine(user1.ReadFile());
             *
             * UserProxy user2 = new UserProxy("user2", "member");
             * Console.WriteLine(user2.ReadFile());*/
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Loading 3 hi-res (proxy) images");

            ProxyImage image1 = new ProxyImage("jotain");
            ProxyImage image2 = new ProxyImage("jotain");
            ProxyImage image3 = new ProxyImage("jotain");

            Console.WriteLine("Calling show to image1");
            image1.ShowImage();

            Console.ReadLine();
        }