Skip to content
Docs Try Aspire

DistributedApplicationEventSubscription Constructors

Class Constructors 1 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)
{
// ...
}
}
callback Func<IDistributedApplicationEvent, CancellationToken, Task> Callback to invoke when the event is published.