IStatelessServiceInstance.OpenAsync(IStatelessServicePartition, CancellationToken) 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>

Parameters

partition
IStatelessServicePartition

The IStatelessServicePartition that this instance is associated with

cancellationToken
System.Threading.CancellationToken

The System.Threading.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

System.Threading.Tasks.Task<System.String>

Returns System.Threading.Tasks.Task`1 of type System.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