Skip to content

philipmat/EnumerableStreamFileResult

Repository files navigation

EnumerableStreamFileResult

Example of efficiently writing an IEnumerable to a FileResult.

The EnumerableFileResult<T> class can be initialized with an IEnumerable<T> and when executed by the ASP.NET Core pipeline in enumerates through the enumerable and using a custom adapter, IStreamWritingAdapter<T>, writes each item to the response stream (HttpContext.Response.Body).

More details and reasoning at: http://philipm.at/2018/enumerablefilestreamer.html

About

Example of efficiently writing an IEnumerable to a FileResult

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published