NPv.ExecutionContext.Abstractions
1.0.1
dotnet add package NPv.ExecutionContext.Abstractions --version 1.0.1
NuGet\Install-Package NPv.ExecutionContext.Abstractions -Version 1.0.1
<PackageReference Include="NPv.ExecutionContext.Abstractions" Version="1.0.1" />
<PackageVersion Include="NPv.ExecutionContext.Abstractions" Version="1.0.1" />
<PackageReference Include="NPv.ExecutionContext.Abstractions" />
paket add NPv.ExecutionContext.Abstractions --version 1.0.1
#r "nuget: NPv.ExecutionContext.Abstractions, 1.0.1"
#:package NPv.ExecutionContext.Abstractions@1.0.1
#addin nuget:?package=NPv.ExecutionContext.Abstractions&version=1.0.1
#tool nuget:?package=NPv.ExecutionContext.Abstractions&version=1.0.1
NPv.ExecutionContext.Abstractions
Minimal execution context contract for .NET applications.
Provides a unified abstraction to access the current user identity inside business logic, without direct dependency on ASP.NET Core or transport-specific details.
✨ Provided Interfaces
Interface | Purpose |
---|---|
IUserContext |
Represents the current user identity (ID, name, authentication state) |
namespace NPv.ExecutionContext;
public interface IUserContext
{
Guid GetCurrentUserId();
string? GetUserName();
bool IsAuthenticated { get; }
}
🔧 Use Cases
- Clean separation of user identity from transport layer
- Enable testable and framework-agnostic business logic
- Consistent access to the current user in APIs, background workers, or tests
📦 NuGet
dotnet add package NPv.ExecutionContext.Abstractions
Author's Note
This library grew out of my long-standing personal interest in structuring and publishing open source packages. Over time, I’ve revisited and refined earlier internal utilities and ideas, giving them a more consistent shape and preparing them for wider reuse. Along the way, I’ve also taken the opportunity to explore how open source distribution and licensing work in the .NET ecosystem.
It’s a small step toward something I’ve always wanted to try — sharing practical, minimal tools that reflect years of learning, experimentation, and refinement.
Hopefully, someone finds it useful.
Nikolai 😛
⚖️ License
MIT — free for commercial and open-source use.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.1 | 161 | 8/24/2025 |