<PackageReference Include="System.ClientModel" Version="1.7.0" />

OperationResult

public abstract class OperationResult
Represents an operation that runs asynchronously on a cloud service. Cloud services use long-running operations to allow users to start an operation with one request and then monitor progress of the operation until it has completed. OperationResult enables waiting for completion of long-running operations. Client libraries provide derived types that add properties such as Value or Status as applicable for a given service operation.
public bool HasCompleted { get; protected set; }

Gets a value that indicates whether the operation has completed.

public abstract ContinuationToken RehydrationToken { get; protected set; }

Gets a token that can be used to rehydrate the operation.

protected OperationResult(PipelineResponse response)

Creates a new instance of OperationResult.

Gets the PipelineResponse corresponding to the most recent update received from the service.

protected void SetRawResponse(PipelineResponse response)

Update the value returned from GetRawResponse.

public abstract ClientResult UpdateStatus(RequestOptions options = null)

Sends a request to the service to get the current status of the operation and updates HasCompleted and other relevant properties.

public abstract ValueTask<ClientResult> UpdateStatusAsync(RequestOptions options = null)

Sends a request to the service to get the current status of the operation and updates HasCompleted and other relevant properties.

public virtual void WaitForCompletion(CancellationToken cancellationToken = default)

Waits for the operation to complete processing on the service.

public virtual ValueTask WaitForCompletionAsync(CancellationToken cancellationToken = default)

Waits for the operation to complete processing on the service.