Skip to content
Docs Try Aspire
Docs Try

EventingSubscriberRegistrationContext

Handle
📦 Aspire.Hosting v13.3.0
interface EventingSubscriberRegistrationContext {
readonly cancellationToken: cancellationToken;
readonly executionContext: DistributedApplicationExecutionContext;
onAfterResourcesCreated(callback: (arg: AfterResourcesCreatedEvent) => Promise<void>): DistributedApplicationEventSubscription;
onBeforeStart(callback: (arg: BeforeStartEvent) => Promise<void>): DistributedApplicationEventSubscription;
}

Properties

property cancellationToken cancellationToken get
Gets the CancellationToken property
property executionContext DistributedApplicationExecutionContext get
Gets the ExecutionContext property

Methods

Subscribes an eventing subscriber to the AfterResourcesCreated event
onAfterResourcesCreated(callback: (arg: AfterResourcesCreatedEvent) => Promise<void>): DistributedApplicationEventSubscription
callback (arg: AfterResourcesCreatedEvent) => Promise<void>
DistributedApplicationEventSubscription
Subscribes an eventing subscriber to the BeforeStart event
onBeforeStart(callback: (arg: BeforeStartEvent) => Promise<void>): DistributedApplicationEventSubscription
callback (arg: BeforeStartEvent) => Promise<void>
DistributedApplicationEventSubscription