Esempio n. 1
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();
        }
Esempio n. 2
0
        private static void PopulateCarStreams(DefaultContainer container, InMemoryStreamProvider <ReferenceEqualityComparer> inMemoryProvider)
        {
            var entities = container.Car.ToList();

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

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

            inMemoryProvider.SaveStreams();
        }