GetContentProvider(IExecutionContext, Func<Stream>, string) Method
Creates a content provider from a delegate that returns a Stream to use on each content request. A new stream should be returned on each request since it may be read concurrently.

Syntax

public static IContentProvider GetContentProvider(this IExecutionContext executionContext, Func<Stream> getStream, string mediaType)

Parameters

Name Type Description
executionContext IExecutionContext
getStream Func<Stream>
mediaType string

Return Value

Type Description
IContentProvider