InitializeResourceEvent Constructors
Class Constructors 1 member
This event is raised by orchestrators to signal to resources that they should initialize themselves.
Constructor(IResource, IDistributedApplicationEventing, ResourceLoggerService, ResourceNotificationService, IServiceProvider) Section titled Constructor(IResource, IDistributedApplicationEventing, ResourceLoggerService, ResourceNotificationService, IServiceProvider) This event is raised by orchestrators to signal to resources that they should initialize themselves.
public class InitializeResourceEvent{ public InitializeResourceEvent( IResource resource, IDistributedApplicationEventing distributedApplicationEventing, ResourceLoggerService resourceLoggerService, ResourceNotificationService resourceNotificationService, IServiceProvider services) { // ... }}Parameters
resource IResource The resource that is being created. distributedApplicationEventing IDistributedApplicationEventing The IDistributedApplicationEventing service for the app host. resourceLoggerService ResourceLoggerService The ResourceLoggerService for the app host. resourceNotificationService ResourceNotificationService The ResourceNotificationService for the app host. services IServiceProvider The IServiceProvider for the app host. Remarks
Custom resources can subscribe to this event to perform initialization tasks, including starting background tasks that manage the resource's lifecycle.