HostLoom.Locking.DependencyInjection 0.5.0

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

HostLoom.Locking.DependencyInjection

This package registers the HostLoom.Locking kernel with Microsoft.Extensions.DependencyInjection:

services
    .AddHostLoomLocking(locking => locking.Namespace = "billing")
    .UseInMemory()
    .AddHealthChecks();

AddHostLoomLocking binds LockingOptions, validates them when the host starts with messages that name the option key at fault, and registers IDistributedLock as a singleton composed from the provider chosen on the builder. It works without AddHostLoom(); nothing here references the messaging kernel. Repeated calls return a builder over the same registration, and every registration is TryAdd, so an application can register its own TimeProvider or provider first.

Exactly one provider per service collection: UseInMemory() installs the per-process provider, and a backend package such as HostLoom.Redis adds its own Use* extension over UseProvider<TProvider>(name). A second Use* throws and names the provider already chosen. An enabled lock with no provider fails startup validation; Locking:Enabled = false is single-instance mode and needs none.

AddHealthChecks() registers a readiness check tagged ready that asks the provider's ILockProviderHealthProbe whether the backend is reachable. A provider without a probe, including the in-memory one, reports healthy with a description saying so. Liveness is never touched.

See the HostLoom.Locking package README for the contract, the retry policy, and the lost-lease semantics.

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 HostLoom.Locking.DependencyInjection:

Package Downloads
HostLoom.Redis

Redis backend for HostLoom caching, locking, and rate limiting over shared connections and StackExchange.Redis.

HostLoom.Valkey

Standalone Valkey backend for HostLoom caching, coordination locks, and token-bucket rate limiting over ValkeyDotNet.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.20.0 0 10/31/2026
0.19.0 75 10/29/2026
0.18.0 116 10/27/2026
0.17.0 154 10/25/2026
0.16.1 145 10/22/2026
0.16.0 190 10/14/2026
0.15.1 137 10/12/2026
0.15.0 132 10/4/2026
0.14.0 116 10/4/2026
0.13.0 112 9/28/2026
0.12.0 110 9/27/2026
0.11.0 110 9/25/2026
0.10.0 115 9/22/2026
0.9.0 109 9/22/2026
0.8.0 125 9/19/2026
0.7.0 121 9/17/2026
0.6.0 147 9/6/2026
0.5.0 127 9/5/2026
0.4.0 129 9/3/2026