DotNetBrightener.Plugins.EventPubSub.DependencyInjection 2023.0.20

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

// Install DotNetBrightener.Plugins.EventPubSub.DependencyInjection as a Cake Tool
#tool nuget:?package=DotNetBrightener.Plugins.EventPubSub.DependencyInjection&version=2023.0.20

Extensions for ASP.NET Core of Event Publish/Subscribe Library

© DotNet Brightener

Usage

Register at startup
// register the core Event Pub/Sub service
services.AddEventPubSubService();

// other service registrations

Then register the implementation of IEventHandler by calling

services.AddEventHandler<YourEventModelEventHandler>();

If you want to automatically let the application detect and register all the implementations of IEventHandler, put the following at the end of your ConfigureServices method in Startup.cs if you use Startup.cs file, or before the application run if you use minimal API.


// before starting the applications

// load all assemblies that are loaded into the application domain
var applicationAssemblies = AppDomain.CurrentDomain.GetAssemblies();

// Register the implementations of IEventHandler from the above assemblies
services.AddEventHandlersFromAssemblies(applicationAssemblies);

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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-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)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DotNetBrightener.Plugins.EventPubSub.DependencyInjection:

Package Downloads
DotNetBrightener.WebApp.CommonShared

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2023.0.20 57 11/27/2023
2023.0.19 70 11/20/2023
2023.0.18 104 10/25/2023
2023.0.17 158 10/22/2023
2023.0.16 163 10/16/2023
2023.0.16-alpha-1 64 10/16/2023
2023.0.15 105 10/14/2023
2023.0.14 86 10/14/2023
2023.0.13 80 10/14/2023
2023.0.12 81 10/14/2023
2023.0.11 78 10/10/2023
2023.0.10 92 10/9/2023
2023.0.9 127 8/16/2023
2023.0.8 109 8/15/2023
2023.0.8-alpha-2 197 5/31/2023
2023.0.7 115 5/12/2023
2023.0.6 127 5/10/2023
2023.0.5 99 5/7/2023
2023.0.4 131 4/22/2023
2023.0.3 167 4/19/2023
2023.0.2 166 4/6/2023
2023.0.1 184 3/13/2023
2022.11.0 286 11/21/2022
2022.10.0 360 10/15/2022
2022.9.0 327 9/5/2022