Share via


ActorProxyEventExtensions.SubscribeAsync Method

Definition

Overloads

SubscribeAsync<TEvent>(IActorEventPublisher, TEvent)

Subscribe to a published actor event.

SubscribeAsync<TEvent>(IActorEventPublisher, TEvent, TimeSpan)

Subscribe to a published actor event.

SubscribeAsync<TEvent>(IActorEventPublisher, TEvent)

Subscribe to a published actor event.

public static System.Threading.Tasks.Task SubscribeAsync<TEvent> (this Microsoft.ServiceFabric.Actors.IActorEventPublisher actorProxy, TEvent subscriber) where TEvent : Microsoft.ServiceFabric.Actors.IActorEvents;
static member SubscribeAsync : Microsoft.ServiceFabric.Actors.IActorEventPublisher * 'Event -> System.Threading.Tasks.Task (requires 'Event :> Microsoft.ServiceFabric.Actors.IActorEvents)
<Extension()>
Public Function SubscribeAsync(Of TEvent As IActorEvents) (actorProxy As IActorEventPublisher, subscriber As TEvent) As Task

Type Parameters

TEvent

The type of the event interface.

Parameters

actorProxy
IActorEventPublisher

The actor that publishes the event.

subscriber
TEvent

The subscriber that receives the events.

Returns

A task that represents the asynchronous operation of subscribing to a published actor event.

Exceptions

When actorProxy is not of type ActorProxy

.

Applies to

SubscribeAsync<TEvent>(IActorEventPublisher, TEvent, TimeSpan)

Subscribe to a published actor event.

public static System.Threading.Tasks.Task SubscribeAsync<TEvent> (this Microsoft.ServiceFabric.Actors.IActorEventPublisher actorProxy, TEvent subscriber, TimeSpan resubscriptionInterval) where TEvent : Microsoft.ServiceFabric.Actors.IActorEvents;
static member SubscribeAsync : Microsoft.ServiceFabric.Actors.IActorEventPublisher * 'Event * TimeSpan -> System.Threading.Tasks.Task (requires 'Event :> Microsoft.ServiceFabric.Actors.IActorEvents)
<Extension()>
Public Function SubscribeAsync(Of TEvent As IActorEvents) (actorProxy As IActorEventPublisher, subscriber As TEvent, resubscriptionInterval As TimeSpan) As Task

Type Parameters

TEvent

The type of the event interface.

Parameters

actorProxy
IActorEventPublisher

The actor that publishes the event.

subscriber
TEvent

The subscriber that receives the events.

resubscriptionInterval
TimeSpan

The time between re-subscription attempts.

Returns

A task that represents the asynchronous operation of subscribing to a published actor event.

Exceptions

When actorProxy is not of type ActorProxy

.

Applies to