Esempio n. 1
0
        private static IContentProvider GetContentProvider(Stream content, string mediaType)
        {
            TestMemoryStreamFactory memoryStreamFactory = new TestMemoryStreamFactory();

            return(content == null ? (IContentProvider) new NullContent() : new StreamContent(memoryStreamFactory, content, mediaType));
        }
Esempio n. 2
0
        private static IContentProvider GetContentProvider(Stream content)
        {
            TestMemoryStreamFactory memoryStreamFactory = new TestMemoryStreamFactory();

            return(content == null ? null : new StreamContent(memoryStreamFactory, content));
        }