Skip to content
Mirko Sangrigoli edited this page Mar 19, 2022 · 2 revisions

Getting Started

The first thing you'll want to do is register the service and the middleware:

program

IMPORTANT

DO NOT manually register IHowlerStructure or IHowlerWhisper!

Create a Whisper

Whisper allow to call methods on other services without having to pull them as dependencies, whilst being able to use the DI to fulfil the Whisper dependencies. Create a class that implements IHowlerWhisper (remember, do not register it!): Whisper example

And to use the service, simply inject the IHowler in your services and call the _howler.Whisper<T> methods to invoke your whisper, where T is the type of the Whisper:

ServiceUsingWhisper

Create a Structure

Structures add another level of abstraction on top of the Whispers, by entirely encapsulating the Structures, and retrieving them by passing an Id to the Howler. Similarly to the Whisper, create a class that implements from IHowlerStructure. Implement the required method and inside, register your structures with a corresponding id (remember, do not register it!): structure example

and then use it as so:

ServiceWithHowler

Clone this wiki locally