Skip to content

NetHacksPack.Integration.Abstractions

Edney Batista da Silva edited this page Jul 1, 2021 · 10 revisions

Get Started

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.

Usage

To use it in your project you can dowload diretly from Nuget:

dotnet add NetHacksPack.Integration.Abstractions

The 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.

Dependencies


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

Clone this wiki locally