Share via


InitializeResourceEvent Class

Definition

This event is raised by orchestrators to signal to resources that they should initialize themselves.

public class InitializeResourceEvent : Aspire.Hosting.Eventing.IDistributedApplicationResourceEvent
type InitializeResourceEvent = class
    interface IDistributedApplicationResourceEvent
    interface IDistributedApplicationEvent
Public Class InitializeResourceEvent
Implements IDistributedApplicationResourceEvent
Inheritance
InitializeResourceEvent
Implements

Remarks

Custom resources can subscribe to this event to perform initialization tasks, including starting background tasks that manage the resource's lifecycle.

Constructors

InitializeResourceEvent(IResource, IDistributedApplicationEventing, ResourceLoggerService, ResourceNotificationService, IServiceProvider)

This event is raised by orchestrators to signal to resources that they should initialize themselves.

Properties

Eventing

The IDistributedApplicationEventing service for the app host.

Logger

An instance of ILogger that can be used to log messages for the resource.

Notifications

The ResourceNotificationService for the app host.

Resource

Resource associated with this event.

Services

The IServiceProvider for the app host.

Applies to