Axlis.Sitecore.Context.Abstractions
0.1.0
dotnet add package Axlis.Sitecore.Context.Abstractions --version 0.1.0
NuGet\Install-Package Axlis.Sitecore.Context.Abstractions -Version 0.1.0
<PackageReference Include="Axlis.Sitecore.Context.Abstractions" Version="0.1.0" />
<PackageVersion Include="Axlis.Sitecore.Context.Abstractions" Version="0.1.0" />
<PackageReference Include="Axlis.Sitecore.Context.Abstractions" />
paket add Axlis.Sitecore.Context.Abstractions --version 0.1.0
#r "nuget: Axlis.Sitecore.Context.Abstractions, 0.1.0"
#:package Axlis.Sitecore.Context.Abstractions@0.1.0
#addin nuget:?package=Axlis.Sitecore.Context.Abstractions&version=0.1.0
#tool nuget:?package=Axlis.Sitecore.Context.Abstractions&version=0.1.0
Axlis.Sitecore.Context.Abstractions

Sitecore-free, per-logical-call ambient context storage for the Axlis.Sitecore.Context family.
Targets net48. Unlike most *.Abstractions packages in the Axlis ecosystem, this one is not multi-targeted (netstandard2.0/net8.0) — the propagation mechanism it provides is built on System.Runtime.Remoting.Messaging (CallContext, ILogicalThreadAffinative), which is a .NET Framework-only API surface with no equivalent shipped on netstandard2.0 or net8.0. This package's only job is that mechanism, so there is no framework-agnostic subset left to split out.
What's in here
AmbientContextStore<T>— a generic, per-logical-call value store. This is the actual thread-safety mechanism behindAxlis.Sitecore.Context.Database/.Request/.HttpContext(seeAxlis.Sitecore.Context.Sitecore102), but it has no dependency on Sitecore orSystem.Web— it stores and retrieves any reference type, isolated per logical call (i.e. per request, correctly flowing acrossawaitcontinuations), with no locking.
Why no lock
A prior reference implementation this package's mechanism is ported from guarded its accessor with a global lock. That lock protects nothing here: the data AmbientContextStore<T> holds is already isolated per logical call context by construction, so two unrelated requests never contend for the same slot. A global lock would only serialize otherwise-independent work — and reintroducing unnecessary locking is exactly the kind of thing that causes the deadlocks this whole package family exists to avoid.
Install
dotnet add package Axlis.Sitecore.Context.Abstractions
See the Axlis repository for full documentation, and the dedicated architecture doc for a full explanation of why the MarshalByRefObject + ILogicalThreadAffinative + CallContext combination is actually thread-safe.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Axlis.Sitecore.Context.Abstractions:
| Package | Downloads |
|---|---|
|
Axlis.Sitecore.Context.Sitecore102
Thread-safe, per-request replacement for Sitecore.Context.Database, Sitecore.Context.Request, and HttpContext.Current, compiled against Sitecore 10.2.x (Sitecore.Kernel + Sitecore.Web [10.2.0,10.3.0)). Exposes Axlis.Sitecore.Context.Database / .Request / .HttpContext as near drop-in replacements for the non-thread-safe ambient statics. Requires manual Web.config registration — see the package README. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 48 | 8/13/2026 |