Soenneker.Utils.MemoryStream 4.0.1427

Prefix Reserved
dotnet add package Soenneker.Utils.MemoryStream --version 4.0.1427
                    
NuGet\Install-Package Soenneker.Utils.MemoryStream -Version 4.0.1427
                    
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.1427" />
                    
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.1427" />
                    
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.1427
                    
#r "nuget: Soenneker.Utils.MemoryStream, 4.0.1427"
                    
#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.1427
                    
#: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.1427
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.MemoryStream&version=4.0.1427
                    
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

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.1427 97 3/13/2026
4.0.1425 365 3/13/2026
4.0.1423 729 3/13/2026
4.0.1422 182 3/13/2026
4.0.1421 655 3/13/2026
4.0.1419 289 3/13/2026
4.0.1418 716 3/12/2026
4.0.1416 142 3/12/2026
4.0.1410 761 3/12/2026
4.0.1409 166 3/12/2026
4.0.1407 487 3/12/2026
4.0.1404 8,097 3/11/2026
4.0.1403 1,069 3/11/2026
4.0.1402 884 3/11/2026
4.0.1401 153 3/11/2026
4.0.1400 201 3/11/2026
4.0.1399 1,641 3/11/2026
4.0.1398 684 3/11/2026
4.0.1396 763 3/11/2026
4.0.1394 599 3/10/2026
Loading failed

Update dependency Soenneker.Utils.AsyncSingleton to 4.0.783 (#1577)