feat(sitecore-context): add ContentDatabase, Site, Language, User to Axlis.Sitecore.Context - #54
Merged
marioarce merged 8 commits intoSep 14, 2026
Conversation
… the HTTP module (#53)
…ContextStoreTests (#53)
…i.yml Closes gap where CLAUDE.md and CHANGELOG.md documented these jobs as already existing in ci.yml, but only the original Axlis.ORM `build` job was ever added. Adds two new jobs mirroring the restore/build/test steps from release-customizations.yml and release-sitecore-context.yml, named to match what WORKFLOWS.md SOP 5 already references.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends
Axlis.Sitecore.Context(published v0.1.0) with four new properties, captured per-request using the same thread-safe mechanism already used for.Database,.Request, and.HttpContext:ContentDatabase—Sitecore.Data.DatabaseSite—Sitecore.Sites.SiteContextLanguage—Sitecore.Globalization.LanguageUser—Sitecore.Security.Accounts.UserDesign follows the signed-off
Axlis - SitecoreContext - Implementation Plan 2 (Final).md: all seven members (including the original three) are captured once inSitecoreContextHttpModule.OnBeginRequestand served from the thread-safe store for the rest of the request. UnlikeDatabase/Request/HttpContext,Site/Language/Usercan legitimately change mid-request (language switch, login/impersonation, site switch) — this is a deliberate snapshot trade-off, not an oversight, and is documented in XML docs, both package READMEs, anddocs/sitecore-context/Architecture.md.This PR ships the package-level change only.
samples/Axlis.Sitecore.Context.Samples.slnupdates are a deferred follow-up. Version bump to1.0.0and the NuGet/GitHub Release happen later, in the release branch per SOP 5 inWORKFLOWS.md— not part of this PR.Changes
Context.cs: 4 new public static properties,CapturedContextgrown to 7 fields,Capture(...)grown to 7 params, new fallback helpers, extensive XML doc<remarks>on the snapshot semantics.SitecoreContextHttpModule.cs:OnBeginRequestnow captures and stores all 7 values.Axlis.Sitecore.Context.Sitecore102/README.md: documents the 4 new properties and the snapshot-semantics trade-off; extends the manual verification checklist.docs/sitecore-context/Architecture.md: new section explaining whySite/Language/Userare captured the same way despite being commonly mutated mid-request.README.md: package-family table updated to list all 7 members.Axlis.Sitecore.Context.Sitecore102.csproj:<Description>updated.AmbientContextStoreTests.cs(Axlis.Sitecore.Context.Abstractions.Tests): fixed 10 pre-existing warnings surfaced during local build verification (missing XML doc comments, a possible-null-reference return, and 3 unnecessaryConfigureAwait(false)calls in test methods) — required for the CONTRIBUTING.md Cross-Cutting Gate (0 warnings/0 errors). Out of this PR's original scope but fixed per explicit request..github/workflows/ci.yml: addedbuild-customizationsandbuild-sitecore-contextjobs.CLAUDE.md/CHANGELOG.mdalready documented these jobs as existing, but only the originalAxlis.ORMbuildjob had ever been added — this closes that documentation/reality gap, and the job names now match whatWORKFLOWS.mdSOP 5 references.Local build (Visual Studio): 3 succeeded, 0 failed, 0 errors, 0 warnings.
Test plan
build-sitecore-contextjobCloses #53