Ejemplo n.º 1
0
        private static void PopulateCache(ICache cache)
        {
            using (Stream stream = typeof(CacheTests).Assembly.GetManifestResourceStream("Parlay.Tests.Content.Domo.png"))
            {
                cache.AddContent("http://example.com/Domo.png", stream.ReadAllBytes());
            }

            using (Stream stream = typeof(CacheTests).Assembly.GetManifestResourceStream("Parlay.Tests.Content.LetGo.png"))
            {
                cache.AddContent("http://example.com/LetGo.png", stream.ReadAllBytes());
            }

            using (Stream stream = typeof(CacheTests).Assembly.GetManifestResourceStream("Parlay.Tests.Content.Traindead.png"))
            {
                cache.AddContent("http://example.com/Traindead.png", stream.ReadAllBytes());
            }
        }