HandleR 1.1.3

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

// Install HandleR as a Cake Tool
#tool nuget:?package=HandleR&version=1.1.3                

HandleR

Summary

The focus of this library is to allow the decoupling of multiple dependancies when writting a service in code.

The pattern this library promotes is one of single responsibility for each IHandler/IHandlerAsync to each request (IRequest of type T) and tightly couples their relationship.

This pattern also makes unit testing legacy classes full of bloated constructor arguements a thing of the past, by creating smaller units of work IHandler/IHandlerAsync you focus less on mocking objects and more on on the functional code you want to prove works.

Usage

  • To use HandleR simply:
    • Create your implementations of
      • IRequest - a generic interface where you declare the return type for the instance of this request.
      • IHandler/IHandlerAsync - generic interfaces which couple to your concrete type of IRequest ensuring that you set the value of the member ForRequest to the typeof(your concret request class).
      • Use either the direct registration technique using the function RegisterHandler on the concrete class HandlerProvider or with your own IOC framework inject all your registered instances of IHandler/IHandlerAsync into the factory constrcutor which accepts a IEnumerable source which will return you an instance of IHandlerProvider.
      • Manually declare the instance or with use of an IOC framework register the IHandlerProvider to the instance of HandlerProvider and Inject the IHandlerProvider instance into your code where you see fit.
      • To trigger your handlers call HandleRequest/HandleRequestAsync on the instance of IHandlerProvider depending on whether your registered your handler as IHandler/IHandlerAsync.
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
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.3 425 5/29/2021
1.0.2 366 5/22/2021
1.0.1 305 5/22/2021
1.0.0 325 5/22/2021