SaintMichaelKit 1.1.1
dotnet add package SaintMichaelKit --version 1.1.1
NuGet\Install-Package SaintMichaelKit -Version 1.1.1
<PackageReference Include="SaintMichaelKit" Version="1.1.1" />
<PackageVersion Include="SaintMichaelKit" Version="1.1.1" />
<PackageReference Include="SaintMichaelKit" />
paket add SaintMichaelKit --version 1.1.1
#r "nuget: SaintMichaelKit, 1.1.1"
#addin nuget:?package=SaintMichaelKit&version=1.1.1
#tool nuget:?package=SaintMichaelKit&version=1.1.1
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 |
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 | Versions 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. |
-
net8.0
- FluentValidation (>= 12.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.5)
- SaintMichaelKit.LiteMediator (>= 1.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.