Provides access to a disk-based cache of icon files that were downloaded via HTTP(S).
Inheritance: IIconCache
Beispiel #1
0
        public void SetUp()
        {
            // Create a temporary cache
            _tempDir = new TemporaryDirectory("0install-unit-tests");
            _cache   = new DiskIconCache(_tempDir);

            // Add some dummy icons to the cache
            File.WriteAllText(Path.Combine(_tempDir, new FeedUri("http://0install.de/feeds/images/test1.png").Escape()), "");
            File.WriteAllText(Path.Combine(_tempDir, new FeedUri("http://0install.de/feeds/images/test2.png").Escape()), "");
            File.WriteAllText(Path.Combine(_tempDir, "http_invalid"), "");
        }
        public void SetUp()
        {
            // Create a temporary cache
            _tempDir = new TemporaryDirectory("0install-unit-tests");
            _cache = new DiskIconCache(_tempDir);

            // Add some dummy icons to the cache
            File.WriteAllText(Path.Combine(_tempDir, new FeedUri("http://0install.de/feeds/images/test1.png").Escape()), "");
            File.WriteAllText(Path.Combine(_tempDir, new FeedUri("http://0install.de/feeds/images/test2.png").Escape()), "");
            File.WriteAllText(Path.Combine(_tempDir, "http_invalid"), "");
        }