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
                    
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="Axlis.Sitecore.Context.Abstractions" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Axlis.Sitecore.Context.Abstractions" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Axlis.Sitecore.Context.Abstractions" />
                    
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 Axlis.Sitecore.Context.Abstractions --version 0.1.0
                    
#r "nuget: Axlis.Sitecore.Context.Abstractions, 0.1.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 Axlis.Sitecore.Context.Abstractions@0.1.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=Axlis.Sitecore.Context.Abstractions&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Axlis.Sitecore.Context.Abstractions&version=0.1.0
                    
Install as a Cake Tool

Axlis.Sitecore.Context.Abstractions

Axlis Banner

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 behind Axlis.Sitecore.Context.Database / .Request / .HttpContext (see Axlis.Sitecore.Context.Sitecore102), but it has no dependency on Sitecore or System.Web — it stores and retrieves any reference type, isolated per logical call (i.e. per request, correctly flowing across await continuations), 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 Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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