Aracılığıyla paylaş


FabricRuntime.RegisterStatelessServiceFactoryAsync Method

Definition

Asynchronously registers the specified IStatelessServiceFactory for the specified service type, with the specified timeout and cancellationToken

public System.Threading.Tasks.Task RegisterStatelessServiceFactoryAsync (string serviceTypeName, System.Fabric.IStatelessServiceFactory factory, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.RegisterStatelessServiceFactoryAsync : string * System.Fabric.IStatelessServiceFactory * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RegisterStatelessServiceFactoryAsync (serviceTypeName As String, factory As IStatelessServiceFactory, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

serviceTypeName
String

The type name of the service type (as a string). This should match the type of the service group type as specified in the manifests and/or the CreateService command.

factory
IStatelessServiceFactory

The IStatelessServiceFactory which can create the specified service type.

timeout
TimeSpan

The maximum amount of time Service Fabric will allow this operation to continue before returning a TimeoutException.

cancellationToken
CancellationToken

The CancellationToken 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

The task representing the asynchronous operation.

Applies to