Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/philipmat/enumerablestreamfileresult

Example of efficiently writing an IEnumerable to a FileResult
https://github.com/philipmat/enumerablestreamfileresult

Last synced: about 1 month ago
JSON representation

Example of efficiently writing an IEnumerable to a FileResult

Awesome Lists containing this project

README

        

# EnumerableStreamFileResult

Example of efficiently writing an `IEnumerable` to a `FileResult`.

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

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