Example #1
0
        private static void PopulateCustomerStreams(DefaultContainer container, InMemoryStreamProvider <ReferenceEqualityComparer> inMemoryProvider)
        {
            var entities = container.Customer.ToList();

            inMemoryProvider.InitializeEntityNamedStream(entities[0], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("abcagtagag"));
            inMemoryProvider.InitializeEntityNamedStream(entities[1], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("aahahah"));
            inMemoryProvider.InitializeEntityNamedStream(entities[2], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("aghawrararh"));
            inMemoryProvider.InitializeEntityNamedStream(entities[3], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("itlf,u5"));
            inMemoryProvider.InitializeEntityNamedStream(entities[4], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("cbvnrystj46w"));
            inMemoryProvider.InitializeEntityNamedStream(entities[5], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("rhwh3qw5"));
            inMemoryProvider.InitializeEntityNamedStream(entities[6], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("ajh5uw35635"));
            inMemoryProvider.InitializeEntityNamedStream(entities[7], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("4y24y24yq"));
            inMemoryProvider.InitializeEntityNamedStream(entities[8], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("y422y424y24y"));
            inMemoryProvider.InitializeEntityNamedStream(entities[9], "Video", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("9t75p89lk"));

            inMemoryProvider.InitializeEntityNamedStream(entities[0], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("abcagtagag"));
            inMemoryProvider.InitializeEntityNamedStream(entities[1], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("aahahah"));
            inMemoryProvider.InitializeEntityNamedStream(entities[2], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("aghawrararh"));
            inMemoryProvider.InitializeEntityNamedStream(entities[3], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("itlf,u5"));
            inMemoryProvider.InitializeEntityNamedStream(entities[4], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("cbvnrystj46w"));
            inMemoryProvider.InitializeEntityNamedStream(entities[5], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("rhwh3qw5"));
            inMemoryProvider.InitializeEntityNamedStream(entities[6], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("ajh5uw35635"));
            inMemoryProvider.InitializeEntityNamedStream(entities[7], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("4y24y24yq"));
            inMemoryProvider.InitializeEntityNamedStream(entities[8], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("y422y424y24y"));
            inMemoryProvider.InitializeEntityNamedStream(entities[9], "Thumbnail", null, false, "application/octet-stream", Encoding.UTF8.GetBytes("9t75p89lk"));

            inMemoryProvider.SaveStreams();
        }
Example #2
0
        private static void PopulateCustomerInfoStreams(DefaultContainer container, InMemoryStreamProvider <ReferenceEqualityComparer> inMemoryProvider)
        {
            var entities = container.CustomerInfo.ToList();

            inMemoryProvider.InitializeEntityMediaStream(entities[0], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 0"));
            inMemoryProvider.InitializeEntityMediaStream(entities[1], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 1"));
            inMemoryProvider.InitializeEntityMediaStream(entities[2], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 2"));
            inMemoryProvider.InitializeEntityMediaStream(entities[3], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 3"));
            inMemoryProvider.InitializeEntityMediaStream(entities[4], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 4"));
            inMemoryProvider.InitializeEntityMediaStream(entities[5], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 5"));
            inMemoryProvider.InitializeEntityMediaStream(entities[6], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 6"));
            inMemoryProvider.InitializeEntityMediaStream(entities[7], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 7"));
            inMemoryProvider.InitializeEntityMediaStream(entities[8], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 8"));
            inMemoryProvider.InitializeEntityMediaStream(entities[9], null, false, "text/plain", Encoding.UTF8.GetBytes("Test stream data 9"));

            inMemoryProvider.SaveStreams();
        }