SaintMichaelKit 1.1.1

dotnet add package SaintMichaelKit --version 1.1.1
                    
NuGet\Install-Package SaintMichaelKit -Version 1.1.1
                    
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="SaintMichaelKit" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SaintMichaelKit" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="SaintMichaelKit" />
                    
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 SaintMichaelKit --version 1.1.1
                    
#r "nuget: SaintMichaelKit, 1.1.1"
                    
#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.
#addin nuget:?package=SaintMichaelKit&version=1.1.1
                    
Install SaintMichaelKit as a Cake Addin
#tool nuget:?package=SaintMichaelKit&version=1.1.1
                    
Install SaintMichaelKit as a Cake Tool

SaintMichaelKit

Modular utility library for .NET applications, designed to improve code organization, integration, and developer productivity through a set of lightweight and extensible helper components.

Package Version Downloads
SaintMichaelKit NuGet Nuget

Features

  • ✅ General-purpose helper methods for everyday development.
  • ✅ Clean and consistent Result/Error pattern for operation outcomes.
  • ✅ Built-in FluentValidation integration via pipeline behavior.
  • ✅ Includes behaviors for:
    • Validation
    • Logging
    • Exception handling
  • ✅ Based on SaintMichaelKit.LiteMediator, a lightweight in-process mediator.

Installation

Install via NuGet Package Manager:

dotnet add package SaintMichaelKit --version 1.*

Or via Package Manager Console:

Install-Package SaintMichaelKit -Version 1.*

Usage

Register helpers and mediator configuration in your DI container:

services.AddSimpleMediator();
services.AddMediatorBehavior<ValidationPipelineBehavior<,>>();
services.AddMediatorBehavior<ExceptionHandlingPipelineBehavior<,>>();
services.AddMediatorBehavior<RequestLoggingPipelineBehavior<,>>();

Use Result and Error in your domain or application layer:

public async Task<Result> DoSomethingAsync()
{
    if (someConditionFails)
        return Result.Failure(Error.Validation("ERR001", "Invalid input."));

    return Result.Success();
}

Extend with custom validation:

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

When registered, validators will be automatically executed via ValidationPipelineBehavior.


Documentation

Check out the GitHub repository for full documentation, examples, and source code.

Changelog

See the CHANGELOG.md for details on new features, bug fixes, and version history.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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
1.1.1 67 6/6/2025
1.1.0 83 6/6/2025
1.0.0 67 5/24/2025