Soenneker.Cosmos.Container 4.0.2496

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Cosmos.Container --version 4.0.2496
                    
NuGet\Install-Package Soenneker.Cosmos.Container -Version 4.0.2496
                    
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.Cosmos.Container" Version="4.0.2496" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Cosmos.Container" Version="4.0.2496" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Cosmos.Container" />
                    
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.Cosmos.Container --version 4.0.2496
                    
#r "nuget: Soenneker.Cosmos.Container, 4.0.2496"
                    
#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.Cosmos.Container@4.0.2496
                    
#: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.Cosmos.Container&version=4.0.2496
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Cosmos.Container&version=4.0.2496
                    
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.Cosmos.Container

A utility library for storing Azure Cosmos containers Singleton IoC.

Install

dotnet add package Soenneker.Cosmos.Container

Quick start

using Soenneker.Cosmos.Container.Registrars;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
var result = services.AddCosmosContainerUtilAsSingleton();

Registers Cosmos Container Util with a singleton lifetime.

What you get

  • ICosmosContainerUtil — A utility library for storing Azure Cosmos containers Singleton IoC.
  • CosmosContainerUtilRegistrar — A utility library for storing Azure Cosmos containers.

API at a glance

API What it does Result / important behavior
ICosmosContainerUtil.Get(containerName, cancellationToken) Implements double check locking mechanism. A task whose result is the requested microsoft.Azure.Cosmos.Container.
ICosmosContainerUtil.Delete(containerName, cancellationToken) Removes the entry associated with the specified key. Completes when the requested deletion has finished.
ICosmosContainerUtil.Delete(endpoint, accountKey, databaseName, containerName, cancellationToken) Removes the entry associated with the specified key. Completes when the requested deletion has finished.
CosmosContainerUtilRegistrar.AddCosmosContainerUtilAsSingleton(services) Registers Cosmos Container Util with a singleton lifetime. The same service collection, so additional registrations can be chained.

Practical notes

  • Cancellation stops pending work; it does not undo work that has already completed.
  • Calls that return a cached or singleton value reuse the same instance until the owning service is disposed.
  • Dispose instances you own when their scope ends so held resources can be released.
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 (2)

Showing the top 2 NuGet packages that depend on Soenneker.Cosmos.Container:

Package Downloads
Soenneker.Cosmos.Repository

A data persistence abstraction layer for Cosmos DB

Soenneker.Cosmos.Suite

A concoction of Azure Cosmos utilities and libraries

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.2504 0 8/31/2026
4.0.2503 0 8/31/2026
4.0.2502 10 8/30/2026
4.0.2501 118 8/30/2026
4.0.2500 44 8/30/2026
4.0.2499 44 8/30/2026
4.0.2498 104 8/30/2026
4.0.2497 47 8/30/2026
4.0.2496 78 8/29/2026
4.0.2495 38 8/29/2026
4.0.2494 328 8/27/2026
4.0.2493 175 8/26/2026
4.0.2492 130 8/26/2026
4.0.2491 392 8/22/2026
4.0.2490 210 8/22/2026
4.0.2489 295 8/21/2026
4.0.2488 581 8/19/2026
4.0.2487 256 8/18/2026
4.0.2486 250 8/18/2026
4.0.2485 421 8/14/2026
Loading failed

Improve README usability and API guidance