共用方式為


FabricRuntime.CreateAsync Method

Definition

Overloads

CreateAsync(TimeSpan, CancellationToken)

Creates the FabricRuntime object asynchronously with the specified timeout and cancellationToken.

CreateAsync(Action, TimeSpan, CancellationToken)

Creates the FabricRuntime object asynchronously with the specified callback function which will be executed if the underlying runtime terminates or exits for any reason, timeout, and cancellationToken.

CreateAsync(TimeSpan, CancellationToken)

Creates the FabricRuntime object asynchronously with the specified timeout and cancellationToken.

public static System.Threading.Tasks.Task<System.Fabric.FabricRuntime> CreateAsync (TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
static member CreateAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.FabricRuntime>
Public Shared Function CreateAsync (timeout As TimeSpan, cancellationToken As CancellationToken) As Task(Of FabricRuntime)

Parameters

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

CreateAsync(Action, TimeSpan, CancellationToken)

Creates the FabricRuntime object asynchronously with the specified callback function which will be executed if the underlying runtime terminates or exits for any reason, timeout, and cancellationToken.

public static System.Threading.Tasks.Task<System.Fabric.FabricRuntime> CreateAsync (Action fabricExitCallback, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
static member CreateAsync : Action * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.FabricRuntime>
Public Shared Function CreateAsync (fabricExitCallback As Action, timeout As TimeSpan, cancellationToken As CancellationToken) As Task(Of FabricRuntime)

Parameters

fabricExitCallback
Action

The Action to be executed when the runtime exits or terminates.

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