static void Main(string[] args) { IImage image = new ProxyImage("aaa.jpg"); image.DisPlay(); Console.WriteLine("----------------------------"); image.DisPlay(); }
static void Main(string[] args) { Image image = new ProxyImage("Test.jpg"); Console.WriteLine("Image will be loaded from disk..."); image.Display(); Console.WriteLine("Image is already loaded from the disk..."); image.Display(); }
static void Main(string[] args) { IImage image = new ProxyImage() { FileName = "filename.jpg" }; image.Display(); }
static void Main(string[] args) { var image = new ProxyImage("demo.png"); image.Display(); image.Display(); Console.ReadKey(); }
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(); }
static void Main(string[] args) { IImage image = new ProxyImage("test_10mb.jpg"); //Image will be loaded from disk image.Display(); Console.WriteLine(""); //Image cannot be loaded from disk image.Display(); Console.Read(); }
public static void Main(string[] args) { IImage image = new ProxyImage("test_10Mo.jpg"); // Image will be loaded from disk image.Display(); Console.WriteLine("\n"); // Image will not be loaded from disk image.Display(); Console.ReadLine(); }
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(); }
static void Main(string[] args) { Console.WriteLine("Init proxy image: "); var proxyImage = new ProxyImage("http://image.abc.com"); Console.WriteLine("-------------------------"); Console.WriteLine("Call real service 1st: "); proxyImage.ShowImage(); Console.WriteLine("--------------------------"); Console.WriteLine("Call real service 2nd:"); proxyImage.ShowImage(); Console.ReadLine(); }
static void Main(string[] args) { var image = new ProxyImage("test_10mb.jpg"); Console.WriteLine(); // 图像将从磁盘加载 image.Display(); Console.WriteLine(); // 图像不需要从磁盘加载 image.Display(); Console.ReadKey(); }
static void Main(string[] args) { // Initialize == Loading image + displaying IImage image = new ProxyImage("test.jpg"); image.Display(); //Already loaded image.Display(); // New image with initialization == Loading image + displaying. IImage image2 = new ProxyImage("test2.jpg"); image2.Display(); Console.ReadKey(); }