コード例 #1
0
ファイル: Program.cs プロジェクト: wwwK/DesignPatterns
        static void Main(string[] args)
        {
            Image image = new ProxyImage("testImage.jpg");

            //image will be loaded from disk
            image.display();
            Console.WriteLine("");

            //image will not be loaded from disk
            image.display();
        }
コード例 #2
0
ファイル: ProxyPattern.cs プロジェクト: vinhdoan/problems
        public static void Main(String[] args)
        {
            IImage image = new ProxyImage("test_10mb.jpg");

            //image will be loaded from disk
            image.display();
            Console.WriteLine("");

            //image will not be loaded from disk
            image.display();

            Console.ReadKey();
        }