CleanArchitecture.Extensions.Core 0.1.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package CleanArchitecture.Extensions.Core --version 0.1.5
                    
NuGet\Install-Package CleanArchitecture.Extensions.Core -Version 0.1.5
                    
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="CleanArchitecture.Extensions.Core" Version="0.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CleanArchitecture.Extensions.Core" Version="0.1.5" />
                    
Directory.Packages.props
<PackageReference Include="CleanArchitecture.Extensions.Core" />
                    
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 CleanArchitecture.Extensions.Core --version 0.1.5
                    
#r "nuget: CleanArchitecture.Extensions.Core, 0.1.5"
                    
#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 CleanArchitecture.Extensions.Core@0.1.5
                    
#: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=CleanArchitecture.Extensions.Core&version=0.1.5
                    
Install as a Cake Addin
#tool nuget:?package=CleanArchitecture.Extensions.Core&version=0.1.5
                    
Install as a Cake Tool

CleanArchitecture.Extensions.Core

Core primitives for Clean Architecture apps built on MediatR.

  • Pipeline behaviors for logging, performance timing, and correlation IDs.
  • Result model with trace identifiers, error aggregation, and success/failure helpers.
  • Domain event support, guard helpers, and clock abstractions for deterministic tests.
  • Legacy template shims (LegacyResult/LegacyResult<T>) to ease migration from Jason Taylor’s Result shape.
  • Ships with SourceLink, XML docs, and snupkg symbols for a smooth debugging experience.

Install

dotnet add package CleanArchitecture.Extensions.Core --version 0.1.1-preview.1

Usage

Register Core services and configure options:

using CleanArchitecture.Extensions.Core;
using CleanArchitecture.Extensions.Core.Options;
using MediatR;

services.AddCleanArchitectureCore(options =>
{
    options.CorrelationHeaderName = "X-Trace-ID";
    options.EnablePerformanceLogging = true;
    options.PerformanceWarningThreshold = TimeSpan.FromMilliseconds(250);
});

services.AddMediatR(cfg =>
{
    cfg.RegisterServicesFromAssemblyContaining<Program>();
    cfg.AddCleanArchitectureCorePipeline();
    // Optional: cfg.AddCleanArchitectureCorePipeline(p => p.UsePerformanceBehavior = false);
});

Work with results:

using CleanArchitecture.Extensions.Core.Results;

var result = Result.Success(order, Activity.Current?.Id);

if (result.IsFailure)
{
    return Results.BadRequest(result.Errors);
}

// Map to/from template-style Result shape during migration.
var legacy = LegacyResult.FromResult(result);
var backToRich = legacy.ToResult(result.TraceId);

Target frameworks

  • net10.0
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CleanArchitecture.Extensions.Core:

Package Downloads
CleanArchitecture.Extensions.Validation

MediatR validation pipeline with FluentValidation integration, notifications, and options aligned to CleanArchitecture.Extensions.Core results.

CleanArchitecture.Extensions.Exceptions

Exception catalog, pipeline behavior, and redaction utilities for Clean Architecture applications.

GitHub repositories

This package is not used by any popular GitHub repositories.