New Release: Marvin.StreamExtensions

I just released a new NuGet package, Marvin.StreamExtensions.  It contains a set of helper extension methods (on Stream) for working with streams which I find particularly useful for interacting with an API through HttpClient.

Working with streams when interacting with an API has the advantage of lowering your memory footprint and potentially improves performance as well, yet it’s quite a lot of code to write, especially once you start using streams for both input (sending data) and output (reading data from a response).  These methods help with that. 

There’s 24 extension methods in total (sync & async where it makes sense, generic & non-generic) in this initial release.  Examples: SerializeToJsonAndWriteAsync<T>, SerializeToJsonAndWrite and ReadAndDeserializeFromJson<T>.

You can find the source code on GitHub, and the package on NuGet.  If you’ve got any suggestions, please use the issue list on the GitHub repo.

Happy coding! :-)

 Tweet about this on TwitterShare on LinkedInShare on Facebook

One Comment

Krzysztof Urban

Have you plans, to publish a new PluralSight course about how efficiently consume WebAPI ,
using client written in .NET? :)
Thanks for answer!

Comments are closed.