OESSolution.Result.Wolverine 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package OESSolution.Result.Wolverine --version 1.0.0
                    
NuGet\Install-Package OESSolution.Result.Wolverine -Version 1.0.0
                    
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="OESSolution.Result.Wolverine" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OESSolution.Result.Wolverine" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OESSolution.Result.Wolverine" />
                    
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 OESSolution.Result.Wolverine --version 1.0.0
                    
#r "nuget: OESSolution.Result.Wolverine, 1.0.0"
                    
#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 OESSolution.Result.Wolverine@1.0.0
                    
#: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=OESSolution.Result.Wolverine&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OESSolution.Result.Wolverine&version=1.0.0
                    
Install as a Cake Tool

OESSolution.Result.Wolverine

A NuGet package that integrates the Result pattern with the Wolverine framework for .NET applications.

This package provides a clean, domain‑agnostic way to handle Result and Result<T> across HTTP endpoints and message handlers, enabling automatic error handling, validation, and response generation—without coupling your domain or application logic to Wolverine or HTTP concerns.

Key Principles

  • Domain‑agnostic: No dependency on domain‑specific exceptions or inheritance.
  • Result‑centric: Behavior is driven by Result and Error, not exception types.
  • Framework‑level: Designed to be published once and reused across multiple applications.
  • Clean Architecture friendly: Clear separation between domain, application, middleware, and transport layers.

Features

HTTP Response Handling

ResultHttpPolicy automatically processes Result<T> and Result return types from HTTP endpoints.

  • Result<T>
    • Success → 200 OK with JSON body
  • Result
    • Success → 204 No Content
  • Failure
    • Automatically mapped to ProblemDetails
    • HTTP status codes derived from Error (e.g. Validation, NotFound, Conflict)
    • No manual response mapping is required.

Message Handler Processing

ResultHandlerPolicy adds automatic short‑circuiting to message handlers.

  • If a handler returns a failed Result, further processing stops
  • Designed for cascading messages and workflows
  • No explicit checks required in handler code

Automatic Middleware Application

AutoResultPolicies apply middleware automatically to Wolverine pipelines:

  • FluentValidation integration
    • Executes registered IValidator<T>
    • Converts validation failures into Result failures
  • Exception handling
    • Converts exceptions carrying Error information into Result failures
    • Infrastructure and unexpected exceptions are re‑thrown
    • The middleware does not depend on domain exception types—only on the presence of Error.

Configuration Extensions

Provides extension methods for simple setup:

  • WolverineOptions
  • WolverineHttpOptions

No manual pipeline wiring is required.

Installation

dotnet add package OESSolution.Result.Wolverine

Usage

Basic Setup

using OESSolution.Result.Wolverine;

builder.Services.AddWolverine(opts =>
{
    opts.UseEnterpriseResultPattern();
});

builder.Services.AddWolverineHttp(opts =>
{
    opts.UseEnterpriseResultPatternHttp();
});

HTTP Endpoint Example

public class MyEndpoint
{
    public Result<MyData> GetData(Query query)
    {
        if (someCondition)
            return Error.NotFound("Data.NotFound", "Data not found");

        return new MyData();
    }
}

Automatically produces:

  • 200 OK with JSON on success
  • 404 Not Found with ProblemDetails on failure

Message Handler Example

public class MyHandler
{
    public Result Handle(MyMessage message)
    {
        return Result.Success();
    }
}

If a failure is returned, processing stops automatically.

Validation Example

public class MyRequestValidator : AbstractValidator<MyRequest>
{
    public MyRequestValidator()
    {
        RuleFor(x => x.Name).NotEmpty();
    }
}

Validation failures are converted into Result failures without additional code.

Dependencies

  • Wolverine
  • FluentValidation
  • OESSolution.Result (for Result and Error types)

Contributing

Contributions are welcome.
Please submit issues or pull requests with clear descriptions and rationale.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated