Share via


FabricRuntime.RegisterStatefulServiceFactoryAsync Method

Definition

Registers the specified IStatefulServiceFactory for the specified service type with the specified timeout and cancellationToken.

public System.Threading.Tasks.Task RegisterStatefulServiceFactoryAsync (string serviceTypeName, System.Fabric.IStatefulServiceFactory factory, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.RegisterStatefulServiceFactoryAsync : string * System.Fabric.IStatefulServiceFactory * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RegisterStatefulServiceFactoryAsync (serviceTypeName As String, factory As IStatefulServiceFactory, 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
IStatefulServiceFactory

The IStatefulServiceFactory 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 representing the asynchronous operation.

Applies to