Apizr.Integrations.MediatR 4.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Apizr.Integrations.MediatR --version 4.1.0                
NuGet\Install-Package Apizr.Integrations.MediatR -Version 4.1.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="Apizr.Integrations.MediatR" Version="4.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Apizr.Integrations.MediatR --version 4.1.0                
#r "nuget: Apizr.Integrations.MediatR, 4.1.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.
// Install Apizr.Integrations.MediatR as a Cake Addin
#addin nuget:?package=Apizr.Integrations.MediatR&version=4.1.0

// Install Apizr.Integrations.MediatR as a Cake Tool
#tool nuget:?package=Apizr.Integrations.MediatR&version=4.1.0                

Apizr

Refit based web api client management, but resilient (retry, connectivity, cache, auth, log, priority, etc...)

Read - Documentation Browse - Source

History

The Apizr project was motivated by this 2015 famous blog post about resilient networking.

Its main focus was to address at least everything explained into this article, meanning:

  • Easy access to restful services
  • Work offline with cache management
  • Handle errors with retry pattern and global catching
  • Handle request priority
  • Check connectivity
  • Fast development time
  • Easy maintenance
  • Reuse existing libraries

But also, some more core features like:

  • Trace http traffic
  • Handle authentication

And more integration/extension independent optional features like:

  • Choose cache, log and connectivity providers
  • Register it as an MS DI extension
  • Integrate with Shiny
  • Map model with DTO
  • Use Mediator pattern
  • Use Optional pattern

The list is not exhaustive, there’s more, but what we wanted was playing with all of it with as less code as we could, not worrying about plumbing things and being sure everything is wired and handled by design or almost.

Inspired by Refit.Insane.PowerPack, we wanted to make it simple to use, mixing attribute decorations and fluent configuration.

Also, we built this lib to make it work with any .Net Standard 2.0 compliant platform, so we could use it seamlessly from any kind of app, with or without DI goodness.

Libraries

Change Log

Project Current Upcoming
Apizr NuGet NuGet Pre Release
Apizr.Extensions.Microsoft.DependencyInjection NuGet NuGet Pre Release
Apizr.Extensions.Microsoft.Caching NuGet NuGet Pre Release
Apizr.Integrations.Akavache NuGet NuGet Pre Release
Apizr.Integrations.MonkeyCache NuGet NuGet Pre Release
Apizr.Integrations.Fusillade NuGet NuGet Pre Release
Apizr.Integrations.MediatR NuGet NuGet Pre Release
Apizr.Integrations.Optional NuGet NuGet Pre Release
Apizr.Integrations.AutoMapper NuGet NuGet Pre Release

Install the NuGet package of your choice:

  • Apizr package comes with the For and CrudFor static instantiation approach (which you can register in your DI container then)
  • Apizr.Extensions.Microsoft.DependencyInjection package extends your IServiceCollection with AddApizr, AddApizrFor and AddApizrCrudFor registration methods
  • Apizr.Extensions.Microsoft.Caching package brings an ICacheHandler method mapping implementation for MS Extensions Caching
  • Apizr.Integrations.Akavache package brings an ICacheHandler method mapping implementation for Akavache
  • Apizr.Integrations.MonkeyCache package brings an ICacheHandler method mapping implementation for MonkeyCache
  • Apizr.Integrations.Fusillade package enables request priority management using Fusillade
  • Apizr.Integrations.MediatR package enables request auto handling with mediation using MediatR
  • Apizr.Integrations.Optional package enables Optional result from mediation requests (requires MediatR integration) using Optional.Async
  • Apizr.Integrations.AutoMapper package enables auto mapping for mediation requests (requires MediatR integration and could work with Optional integration) using AutoMapper

Apizr core package make use of well known nuget packages to make the magic appear:

Package Features
Refit Auto-implement web api interface and deal with HttpClient
Polly Apply some policies like Retry, CircuitBreaker, etc...
Microsoft.Extensions.Logging.Abstractions Delegate logging layer to MS Extensions Logging

It also comes with some handling interfaces to let you provide your own services for:

  • Caching with ICacheHandler, which comes with its default VoidCacheHandler (no cache), but also with:
    • InMemoryCacheHandler & DistributedCacheHandler: MS Extensions Caching methods mapping interface (Integration package referenced above), meaning you can provide any compatible caching engine
    • AkavacheCacheHandler: Akavache methods mapping interface (Integration package referenced above)
    • MonkeyCacheHandler: MonkeyCache methods mapping interface (Integration package referenced above)
  • Logging As Apizr relies on official MS ILogger interface, you may want to provide any compatible logging engine (built-in DebugLogger activated by default)
  • Connectivity with IConnectivityHandler, which comes with its default VoidConnectivityHandler (no connectivity check)
  • Mapping with IMappingHandler, which comes with its default VoidMappingHandler (no mapping conversion), but also with:
    • AutoMapperMappingHandler: AutoMapper mapping methods mapping interface (Integration package referenced above)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 Apizr.Integrations.MediatR:

Package Downloads
Apizr.Integrations.Optional

Refit based web api client management, but resilient (retry, connectivity, cache, auth, log, priority...)

Apizr.Integrations.FileTransfer.MediatR

Refit based web api client management, but resilient (retry, connectivity, cache, auth, log, priority...)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.4.0-preview.3 37 11/14/2024
6.4.0-preview.2 40 11/6/2024
6.4.0-preview.1 42 10/25/2024
6.3.0 379 10/17/2024
6.2.0 230 10/11/2024
6.1.0 399 10/1/2024
6.0.0 509 9/10/2024
6.0.0-preview.9 42 8/29/2024
6.0.0-preview.8 35 8/3/2024
6.0.0-preview.7 713 7/25/2024
6.0.0-preview.6 58 7/18/2024
6.0.0-preview.5 63 6/24/2024
6.0.0-preview.4 72 5/24/2024
6.0.0-preview.3 32 5/2/2024
6.0.0-preview.2 59 3/29/2024
6.0.0-preview.1 56 3/8/2024
5.4.0 326 10/12/2023
5.3.0 286 9/25/2023
5.2.0 324 8/28/2023
5.1.0 377 7/21/2023
5.0.1 358 7/16/2023
5.0.0 401 6/22/2023
5.0.0-preview.4 99 6/16/2023
5.0.0-preview.3 89 6/7/2023
5.0.0-preview.2 88 5/16/2023
5.0.0-preview.1 100 3/22/2023
4.1.0 801 5/2/2022
4.0.0 741 3/30/2022
4.0.0-preview.2 146 3/15/2022
4.0.0-preview.1 136 2/15/2022
3.0.0 925 3/12/2021
2.0.0 777 1/4/2021
1.9.0 893 11/19/2020
1.8.1 864 10/22/2020
1.8.0 895 10/22/2020
1.7.0 875 10/19/2020
1.6.0 970 10/9/2020
1.5.0 986 7/31/2020
1.4.2 972 7/24/2020
1.4.1 909 7/21/2020
1.4.0 885 7/17/2020
1.3.0 898 7/9/2020
1.2.0 715 7/3/2020