Skip to content
DocsTry Aspire
DocsTry

DistributedApplicationEventSubscription Constructors

ClassConstructors1 member
Represents a subscription to an event that is published during the lifecycle of the AppHost.
Constructor(Func<IDistributedApplicationEvent, CancellationToken, Task>)Section titled Constructor(Func<IDistributedApplicationEvent, CancellationToken, Task>)
Represents a subscription to an event that is published during the lifecycle of the AppHost.
public class DistributedApplicationEventSubscription
{
public DistributedApplicationEventSubscription(
Func<IDistributedApplicationEvent, CancellationToken, Task> callback)
{
// ...
}
}
callbackFunc<IDistributedApplicationEvent, CancellationToken, Task>Callback to invoke when the event is published.