InitializeResourceEvent Constructors
ClassConstructors1 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
resourceIdistributedApplicationEventing IIDistributedApplicationEventing service for the AppHost.resourceLoggerService ResourceResourceLoggerService for the AppHost.resourceNotificationService ResourceResourceNotificationService for the AppHost.servicesIServiceProvider The IServiceProvider for the AppHost.Remarks
Custom resources can subscribe to this event to perform initialization tasks, including starting background tasks that manage the resource's lifecycle.