Anarchy.Toolkit.Core
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Core · Package catalog
Foundational, infrastructure-independent building blocks for .NET services.
dotnet add package Anarchy.Toolkit.Core
- Use helpers and extensions for strings, enums, dates and JSON, plus common exception primitives.
- Mark domain objects with
IEntity,IPersistedEntityorIDeepCloneableEntity<T>as appropriate. - Implement
IDependencyInjectionModuleand register it withUseModule<T>()orUseModule(module); use the keyed client-resolver abstractions when selecting clients by key.
When to use it
Reference Core from domain and application projects that need shared contracts without choosing a database, transport or hosting model. Use the more specific Core.* packages only when their corresponding concern is needed; concrete adapters belong at the application’s composition root.
How to use it
- Implement the entity interfaces only where their contracts fit your domain model.
IPersistedEntityidentifies persisted entities, whileIDeepCloneableEntity<T>expresses cloning support. - Group related service registrations in an
IDependencyInjectionModule. Callservices.UseModule<TModule>(configuration, environment)for a parameterless module, or pass an instance toUseModulewhen it needs options. - Keep the module’s configuration choices in the application: pass
IConfiguration, the host environment and any options factories from startup rather than hard-coding environment-specific values in domain code.
For a complete registration example using a concrete adapter, see the module guide.
See the toolkit overview and dependency-injection guide.
Releases
See the release notes for the complete release history.