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
resourceIResourceThe resource that is being created.distributedApplicationEventingIDistributedApplicationEventingThe IDistributedApplicationEventing service for the app host.resourceLoggerServiceResourceLoggerServiceThe ResourceLoggerService for the app host.resourceNotificationServiceResourceNotificationServiceThe ResourceNotificationService for the app host.servicesIServiceProviderThe 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.