Niobium.Platform.Locking
3.2.16
dotnet add package Niobium.Platform.Locking --version 3.2.16
NuGet\Install-Package Niobium.Platform.Locking -Version 3.2.16
<PackageReference Include="Niobium.Platform.Locking" Version="3.2.16" />
<PackageVersion Include="Niobium.Platform.Locking" Version="3.2.16" />
<PackageReference Include="Niobium.Platform.Locking" />
paket add Niobium.Platform.Locking --version 3.2.16
#r "nuget: Niobium.Platform.Locking, 3.2.16"
#:package Niobium.Platform.Locking@3.2.16
#addin nuget:?package=Niobium.Platform.Locking&version=3.2.16
#tool nuget:?package=Niobium.Platform.Locking&version=3.2.16
Niobium.Platform.Locking
Niobium.Platform.Locking provides abstractions, policies, and helpers for distributed locking, impediment management, and resource control in .NET applications. It enables robust, extensible, and testable mechanisms for business process locking, impediment tracking, and policy-driven access control.
What is this project about?
- Defines interfaces and base types for impediment (lock/block) management.
- Implements distributed locking and impediment policies for business resources.
- Provides extension methods for impediment operations (impede, unimpede, query).
- Integrates with Niobium.Platform and Niobium.Database.StorageTable for scalable, persistent locking.
- Used by Niobium.* and consumer projects to standardize distributed locking and impediment management.
Getting Started
1. Install the NuGet Package
Add the package to your .NET project:
dotnet add package Niobium.Platform.Locking
2. Register Locking Services
In your DI setup, use the provided dependency module:
using Niobium.Platform.Locking;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddPlatformLocking();
3. Implement and Use Impedable Resources
Implement the IImpedable interface for your business resource:
using Niobium.Platform.Locking;
public class MyResource : IImpedable
{
public string GetImpedementID() => "resource-id";
public IEnumerable<IImpedimentPolicy> ImpedimentPolicies { get; }
}
4. Impede and Unimpede Resources
Use the extension methods to impede (lock) or unimpede (unlock) resources:
await myResource.ImpedeAsync("CategoryA", 1, "PolicyInput");
await myResource.UnimpedeAsync("CategoryA", 1, "PolicyInput");
5. Query Impediments
Query impediments (locks) for a resource:
await foreach (var impediment in myResource.GetImpedimentsByCategoryAsync("CategoryA"))
{
// Process impediment
}
How Niobium.Platform.Locking is Consumed
Consumer projects use Niobium.Platform.Locking to:
- Register and use distributed locking and impediment policies via DI.
- Standardize lock/impediment management for business resources.
- Integrate with persistent storage for scalable, reliable locking.
- Extend or implement custom impediment policies for advanced scenarios.
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch
- Make your changes with clear commit messages
- Submit a pull request
Please ensure your code follows the existing style and includes appropriate tests and documentation.
License
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Niobium.Platform (>= 3.2.16)
- System.Linq.Async (>= 6.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.