TestabilityExtensions.RestartDeployedCodePackageAsync Method (FabricClient.ApplicationManagementClient, Uri, ReplicaSelector, CompletionMode, CancellationToken)

 

This API call restarts the code package which hosts the replica specified by the ReplicaSelector and belongs to the specified application name.

Namespace:   System.Fabric.Testability
Assembly:  System.Fabric.Testability (in System.Fabric.Testability.dll)

Syntax

public static Task<RestartDeployedCodePackageResult> RestartDeployedCodePackageAsync(
    this FabricClient.ApplicationManagementClient appManagementClient,
    Uri applicationName,
    ReplicaSelector replicaSelector,
    CompletionMode completionMode,
    CancellationToken token
)

Parameters

  • applicationName
    Type: System.Uri

    The name of the application to which the code package belong.s

Return Value

Type: System.Threading.Tasks.Task<RestartDeployedCodePackageResult>

RestartDeployedCodePackageResult which gives information about the actual code package restarted and replica selected.

Exceptions

Exception Condition
TimeoutException

Action took more than its allocated time.

ArgumentNullException

Any of the required arguments are null.

InvalidOperationException

The code package was not in a valid running state.

FabricException

These are the fabric failures FabricErrorCode.ReplicaDoesNotExist - If the Selected replica was not found FabricErrorCode.PartitionNotFound - if the specified partition selected does not exist FabricErrorCode.CodePackageNotFound - If the selected code package was not found.

Remarks

The CompletionMode options are DoNotVerify - Return after triggering the restart of the code package Verify - Return after the restart completes i.e. the code package has ome back up again.

See Also

RestartDeployedCodePackageAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace

Return to top