Soenneker.Utils.MemoryStream 4.0.1356

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.MemoryStream --version 4.0.1356
                    
NuGet\Install-Package Soenneker.Utils.MemoryStream -Version 4.0.1356
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Utils.MemoryStream" Version="4.0.1356" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.MemoryStream" Version="4.0.1356" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.MemoryStream" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Utils.MemoryStream --version 4.0.1356
                    
#r "nuget: Soenneker.Utils.MemoryStream, 4.0.1356"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Utils.MemoryStream@4.0.1356
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Utils.MemoryStream&version=4.0.1356
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.MemoryStream&version=4.0.1356
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.MemoryStream

An easy modern MemoryStream utility

A library for management and simple access of RecyclableMemoryStreamManager

Installation

dotnet add package Soenneker.Utils.MemoryStream

Usage

  1. Register the interop within DI (Program.cs).
public static async Task Main(string[] args)
{
    ...
    builder.Services.AddMemoryStreamUtil();
}
  1. Inject IMemoryStreamUtil wherever you need MemoryStream services

  2. Retrieve a fresh MemoryStream from

Example:

public class TestClass{

    IMemoryStreamUtil _memoryStreamUtil;

    public TestClass(IMemoryStreamUtil memoryStreamUtil)
    {
        _memoryStreamUtil = memoryStreamUtil;
    }

    public async ValueTask<MemoryStream> ReadFileIntoMemoryStream(string path)
    {
        MemoryStream memoryStream = await _memoryStreamUtil.Get(); // .GetSync() is also available

        FileStream fileStream = File.OpenRead(path);

        await fileStream.CopyToAsync(memoryStream);
    
        return memoryStream;
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (9)

Showing the top 5 NuGet packages that depend on Soenneker.Utils.MemoryStream:

Package Downloads
Soenneker.Utils.File

A utility library encapsulating asynchronous file IO operations

Soenneker.Cosmos.Serializer

A fast, lightweight JSON (de)serializer for Azure Cosmos DB

Soenneker.Extensions.HttpContent

A collection of helpful HttpContent extension methods

Soenneker.Blob.Download

A utility library for Azure Blob download operations

Soenneker.Blob.Upload

A utility library for Azure Blob upload operations

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1359 1,290 2/12/2026
4.0.1358 648 2/11/2026
4.0.1357 3,356 2/10/2026
4.0.1356 715 2/10/2026
4.0.1355 3,409 2/10/2026
4.0.1354 4,006 2/5/2026
4.0.1353 3,714 2/4/2026
4.0.1352 3,685 1/28/2026
4.0.1351 5,052 1/22/2026
4.0.1350 3,588 1/22/2026
4.0.1349 3,835 1/20/2026
4.0.1348 3,118 1/18/2026
4.0.1347 2,525 1/18/2026
4.0.1346 5,258 1/13/2026
4.0.1345 1,253 1/13/2026
4.0.1344 5,216 1/12/2026
4.0.1343 593 1/12/2026
4.0.1342 998 1/12/2026
4.0.1341 92 1/12/2026
4.0.1340 1,421 1/12/2026
Loading failed