EventingSubscriberServiceCollectionExtensions.AddEventingSubscriber<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a singleton event subscriber of type T to the service collection.
public static void AddEventingSubscriber<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Aspire.Hosting.Lifecycle.IDistributedApplicationEventingSubscriber;
static member AddEventingSubscriber : Microsoft.Extensions.DependencyInjection.IServiceCollection -> unit (requires 'T : null and 'T :> Aspire.Hosting.Lifecycle.IDistributedApplicationEventingSubscriber)
<Extension()>
Public Sub AddEventingSubscriber(Of T As {Class, IDistributedApplicationEventingSubscriber}) (services As IServiceCollection)
Type Parameters
- T
A service that implements IDistributedApplicationEventingSubscriber
Parameters
- services
- IServiceCollection
The IServiceCollection to add the event subscriber to.