/eventing-aspnetcore

Eventing toolbox for ASP.NET Core

Primary LanguageC#OtherNOASSERTION

Eventing Toolbox

Toolbox for events in ASP.NET Core.

Table of Contents

Installation

To add the toolbox to a project, you add the package to the project.json :

"dependencies": {
    "Eventing":  "1.0.0"
 }

In Visual Studio you can also use the NuGet Package Manager to do this.

Usage

Register the service in the ConfigureServices method in the Startup class:

With the default options:

  services.AddEventing(opt => opt.RegisterExceptionHandler<MyEventingExceptionHandler>());

Since the events are published asynchronously, your code will not be able to catch them. You can create a handler that implements the IEventingExceptionHandler interface and register it during Startup.