Delen via


IStatelessServiceInstance.OpenAsync Method

Definition

Opens an initialized service instance so that it can be contacted by clients.

public System.Threading.Tasks.Task<string> OpenAsync (System.Fabric.IStatelessServicePartition partition, System.Threading.CancellationToken cancellationToken);
abstract member OpenAsync : System.Fabric.IStatelessServicePartition * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function OpenAsync (partition As IStatelessServicePartition, cancellationToken As CancellationToken) As Task(Of String)

Parameters

partition
IStatelessServicePartition

The IStatelessServicePartition that this instance is associated with

cancellationToken
CancellationToken

The CancellationToken object that the operation is observing. It can be used to send a notification that the operation should be canceled. Note that cancellation is advisory and that the operation may still be completed even if it is canceled.

Returns

Returns Task<TResult> of type String.

Remarks

Opening an instance stateless service indicates that the service is now resolvable and discoverable by service clients. The string that is returned is the address of this service instance. The address is associated with the service name via Service Fabric naming and returned to clients that resolve the service via ResolveServicePartitionAsync(Uri).

Applies to