Anch.SecuritySystem.GeneralPermission.Abstractions
3.9.4
dotnet add package Anch.SecuritySystem.GeneralPermission.Abstractions --version 3.9.4
NuGet\Install-Package Anch.SecuritySystem.GeneralPermission.Abstractions -Version 3.9.4
<PackageReference Include="Anch.SecuritySystem.GeneralPermission.Abstractions" Version="3.9.4" />
<PackageVersion Include="Anch.SecuritySystem.GeneralPermission.Abstractions" Version="3.9.4" />
<PackageReference Include="Anch.SecuritySystem.GeneralPermission.Abstractions" />
paket add Anch.SecuritySystem.GeneralPermission.Abstractions --version 3.9.4
#r "nuget: Anch.SecuritySystem.GeneralPermission.Abstractions, 3.9.4"
#:package Anch.SecuritySystem.GeneralPermission.Abstractions@3.9.4
#addin nuget:?package=Anch.SecuritySystem.GeneralPermission.Abstractions&version=3.9.4
#tool nuget:?package=Anch.SecuritySystem.GeneralPermission.Abstractions&version=3.9.4
Anch.Framework
A set of .NET libraries (net10.0) for building the application layer of enterprise applications: role-based access control with security contexts, ORM-independent async LINQ, hierarchy expansion, an OData parser, DI utilities and test infrastructure. Published to NuGet under the Anch.* prefix. MIT license.
The
src/Workflow/subsystem is out of scope for now: do not read or analyze it until the owner lifts the restriction. See doc/modules/workflow.md.
Module map
Module (folder in src/) |
Purpose | Main packages | Document |
|---|---|---|---|
Core |
Base utilities, expression tools, Maybe, data access interfaces, parser combinators, async primitives |
Anch.Core, Anch.GenericRepository, Anch.Parsing, Anch.RelativePath, Anch.Threading |
core.md |
DependencyInjection |
The AddXxx(setup) pattern, proxy factory, registration validator |
Anch.DependencyInjection |
dependency-injection.md |
Caching |
Cache abstraction | Anch.Caching |
caching.md |
IdentitySource, VisualIdentitySource |
Id and display name of a domain object | Anch.IdentitySource, Anch.VisualIdentitySource |
identity-source.md |
GenericQueryable |
GenericToListAsync… and WithFetch independent of the ORM |
Anch.GenericQueryable, …EntityFramework, …NHibernate |
generic-queryable.md |
HierarchicalExpand |
Expansion of ancestor/descendant trees in SQL queries | Anch.HierarchicalExpand |
hierarchical-expand.md |
OData |
$filter/$orderby/$top/$skip string → Expression |
Anch.OData |
odata.md |
SecuritySystem |
Roles, permissions, security contexts, RunAs, notifications, admin UI (Angular) | Anch.SecuritySystem, …GeneralPermission, …VirtualPermission, …Notification, …Configurator, …Testing |
security-system.md |
Testing |
DI container pool, database snapshots, xunit v3 integration | Anch.Testing, Anch.Testing.Xunit, Anch.Testing.Database(.Sqlite/.Configuration) |
testing.md |
Workflow |
Do not study for now | — | workflow.md |
Repository structure
.
├── README.md ← you are here
├── doc/ ← documentation (start with doc/README.md)
├── global.json # test runner: Microsoft.Testing.Platform
├── .github/workflows/ # build.yml (CI), publish.yml (NuGet)
├── graphify-out/ # knowledge graph: only graph.json is in git, the rest is local (not sources)
└── src/
├── Anch.Framework.slnx # the only solution
├── Directory.Build.props # shared properties: net10.0, Nullable, LangVersion=latest
├── Directory.Packages.props # central NuGet versions
├── __RootSolutionItems/ # shared files linked into projects
└── <Module>/Anch.<Module>[.Abstractions|.Domain|.Runtime|…]
Typical module layout (details in doc/architecture.md):
| Project suffix | Contents |
|---|---|
.Domain |
Plain models/enums |
.Abstractions |
Public interfaces |
.Runtime |
Implementations |
| (no suffix) | Entry point: AddXxx(Action<IXxxSetup>) for IServiceCollection |
.EntityFramework, .NHibernate, .Sqlite, .Xunit |
Technology adapters |
*.Tests, *.IntegrationTests*, *.DiTests |
Tests |
Quick start
Requires .NET SDK 10.0.x.
dotnet restore src/Anch.Framework.slnx
dotnet build src/Anch.Framework.slnx -c Release
dotnet test --project src/Core/Anch.Core.Tests -c Release
The full list of test projects, notes on building the configurator's Angular UI, and CI: doc/building-and-testing.md.
Registration example (the idiom of all modules):
services
.AddIdentitySource()
.AddHierarchicalExpand(b => b.AddHierarchicalInfo(v => v.Parent, directedLink, undirectedLink))
.AddSecuritySystem(b => b
.SetQueryableSource<MyQueryableSource>()
.AddSecurityContext<BusinessUnit>(buGuid)
.AddSecurityRole(MyRoles.Manager, new SecurityRoleInfo(roleGuid))
.AddDomainSecurity<Order>(DomainSecurityRule.AnyRole /* or specific roles */, SecurityPath<Order>.Create(o => o.BusinessUnit)));
A complete working example: src/SecuritySystem/_Example/ExampleApp.Infrastructure/DependencyInjection/ServiceCollectionExtensions.cs.
Notes for an AI agent
- Read doc/architecture.md, then doc/where-to-find.md: it maps a task to a file.
- Look for an interface in
*.Abstractions, its implementation in*.Runtime, and its registration in the project without a suffix (DependencyInjection/*Setup.cs). - Look for a usage example of any API in the tests of the corresponding module.
- The code uses C# 14
extension(...)blocks; property paths are always passed asExpression<Func<…>>. - Do not edit
graphify-out/,bin/,obj/; do not touchsrc/Workflow/**.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Anch.SecuritySystem.Abstractions (>= 3.9.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Anch.SecuritySystem.GeneralPermission.Abstractions:
| Package | Downloads |
|---|---|
|
Luxoft.Framework.Authorization.BLL.Core
Package Description |
|
|
Anch.SecuritySystem.GeneralPermission.Runtime
Permissions stored in the application database for Anch.SecuritySystem (implementation) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.9.4 | 0 | 10/31/2026 |
| 3.9.3 | 189 | 10/23/2026 |
| 3.9.2 | 269 | 10/19/2026 |
| 3.9.1 | 980 | 9/24/2026 |
| 3.9.0 | 236 | 9/21/2026 |
| 3.8.10 | 125 | 9/21/2026 |
| 3.8.9 | 123 | 9/21/2026 |
| 3.8.8 | 117 | 9/18/2026 |
| 3.8.7 | 116 | 9/18/2026 |
| 3.8.6 | 173 | 9/11/2026 |
| 3.8.5 | 130 | 9/11/2026 |
| 3.8.4 | 120 | 9/11/2026 |
| 3.8.3 | 128 | 9/10/2026 |
| 3.8.2 | 129 | 9/10/2026 |
| 3.8.0 | 155 | 8/19/2026 |
| 3.7.10 | 331 | 8/12/2026 |
| 3.7.9 | 286 | 8/12/2026 |
| 3.7.8 | 143 | 8/12/2026 |
| 3.7.7 | 135 | 8/11/2026 |
| 3.7.6 | 379 | 7/31/2026 |