Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.33 KB

File metadata and controls

41 lines (32 loc) · 1.33 KB

Waystone.Common.Infrastructure

The foundational code required to create .NET 6 Clean Architecture Infrastructure layer projects for Draekien Industries. It is intended to be used alongside:

Recommended Usage

The below sample code is the recommended usage for this library. If you wish to not use some features provided by the library, then see the Advanced Usage section and do not use AcceptDefaults().

// *.Infrastructure.DependencyInjection.cs
using Waystone.Infrastructure.DependencyInjection;

// Accept the default configuration inside an IServiceCollection extension method
// Currently configures:
// - date time provider
// - date time offset provider
// - random provider
services.AddWaystoneInfrastructureBuilder()
        .AcceptDefaults();

Advanced Usage

// *.Infrastructure.DependencyInjection.cs
using Waystone.Infrastructure.DependencyInjection;

// inside an IServiceCollection extension method
services.AddWaystoneInfrastructureBuilder()
        .AddDateTimeProviders()
        .AddRandomProvider();