-
Notifications
You must be signed in to change notification settings - Fork 0
NetHacksPack.Integration.Abstractions
This package contains the abstractions from providers to help build integrations with different applications using a EventBus channnel interface.
The applications will use the provided interfaces and the implementations should be configured on the Dependency Injection Container. This allows to design applications that can easily change their infrastructure to others kind of channels without causes significant break changes to the project.
To use it in your project you can dowload diretly from Nuget:
dotnet add NetHacksPack.Integration.AbstractionsThe main interface in this package is IEventBus, this interface provides the mechanism to use an event bus, since connect an listen an event, till to publish one. The purpose of this interface is to be the abstraction used in any part on the project as the only way to handle the based event communications.
In general we use to develop by demand, and sometimes we create some coupling with the current infrastruct violating some SOLID principles. To avoid this kind of coupling with event bus the developers can use this package to publish their events or subscribe to them.
This Package contains some dependencies to work, each event should inherit from NetHacksPack.Core.Event, an abstract class that defines what is an Event.
When you subscribe to an event you need to ensure that you have a registered handler