共用方式為


DistributedApplicationResourceEventSubscription Constructor

Definition

Represents a subscription to an event that is published during the lifecycle of the AppHost for a specific resource.

public DistributedApplicationResourceEventSubscription (Aspire.Hosting.ApplicationModel.IResource? resource, Func<Aspire.Hosting.Eventing.IDistributedApplicationResourceEvent,System.Threading.CancellationToken,System.Threading.Tasks.Task> callback);
new Aspire.Hosting.Eventing.DistributedApplicationResourceEventSubscription : Aspire.Hosting.ApplicationModel.IResource * Func<Aspire.Hosting.Eventing.IDistributedApplicationResourceEvent, System.Threading.CancellationToken, System.Threading.Tasks.Task> -> Aspire.Hosting.Eventing.DistributedApplicationResourceEventSubscription
Public Sub New (resource As IResource, callback As Func(Of IDistributedApplicationResourceEvent, CancellationToken, Task))

Parameters

resource
IResource

Applies to