GetContentProvider(IExecutionContext, Stream, string) Method
creates a content provider from a Stream by reading the stream into a buffer and then providing that buffer when content is requested.

Syntax

public static IContentProvider GetContentProvider(this IExecutionContext executionContext, Stream stream, string mediaType)

Parameters

Name Type Description
executionContext IExecutionContext The execution context.
stream Stream A seekable stream from which to buffer content.
mediaType string The media type of the content provider.

Return Value

Type Description
IContentProvider