Operation<T>.WaitForCompletion Method

Definition

Overloads

WaitForCompletion(CancellationToken)

Periodically calls the server till the long-running operation completes.

WaitForCompletion(DelayStrategy, CancellationToken)

Periodically calls the server till the long-running operation completes.

WaitForCompletion(TimeSpan, CancellationToken)

Periodically calls the server till the long-running operation completes.

WaitForCompletion(CancellationToken)

Source:
OperationOfT.cs

Periodically calls the server till the long-running operation completes.

public virtual Azure.Response<T> WaitForCompletion (System.Threading.CancellationToken cancellationToken = default);
abstract member WaitForCompletion : System.Threading.CancellationToken -> Azure.Response<'T>
override this.WaitForCompletion : System.Threading.CancellationToken -> Azure.Response<'T>
Public Overridable Function WaitForCompletion (Optional cancellationToken As CancellationToken = Nothing) As Response(Of T)

Parameters

cancellationToken
CancellationToken

A CancellationToken used for the periodical service calls.

Returns

The last HTTP response received from the server.

Remarks

This method will periodically call UpdateStatusAsync till HasCompleted is true, then return the final result of the operation.

Applies to

WaitForCompletion(DelayStrategy, CancellationToken)

Source:
OperationOfT.cs

Periodically calls the server till the long-running operation completes.

public virtual Azure.Response<T> WaitForCompletion (Azure.Core.DelayStrategy delayStrategy, System.Threading.CancellationToken cancellationToken);
abstract member WaitForCompletion : Azure.Core.DelayStrategy * System.Threading.CancellationToken -> Azure.Response<'T>
override this.WaitForCompletion : Azure.Core.DelayStrategy * System.Threading.CancellationToken -> Azure.Response<'T>
Public Overridable Function WaitForCompletion (delayStrategy As DelayStrategy, cancellationToken As CancellationToken) As Response(Of T)

Parameters

delayStrategy
DelayStrategy

The strategy to use to determine the delay between status requests to the server. If the server returns retry-after header, the delay used will be the maximum specified by the strategy and the header value.

cancellationToken
CancellationToken

A CancellationToken used for the periodical service calls.

Returns

The last HTTP response received from the server.

Remarks

This method will periodically call UpdateStatusAsync till HasCompleted is true, then return the final result of the operation.

Applies to

WaitForCompletion(TimeSpan, CancellationToken)

Source:
OperationOfT.cs

Periodically calls the server till the long-running operation completes.

public virtual Azure.Response<T> WaitForCompletion (TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken);
abstract member WaitForCompletion : TimeSpan * System.Threading.CancellationToken -> Azure.Response<'T>
override this.WaitForCompletion : TimeSpan * System.Threading.CancellationToken -> Azure.Response<'T>
Public Overridable Function WaitForCompletion (pollingInterval As TimeSpan, cancellationToken As CancellationToken) As Response(Of T)

Parameters

pollingInterval
TimeSpan

The interval between status requests to the server. The interval can change based on information returned from the server. For example, the server might communicate to the client that there is not reason to poll for status change sooner than some time.

cancellationToken
CancellationToken

A CancellationToken used for the periodical service calls.

Returns

The last HTTP response received from the server.

Remarks

This method will periodically call UpdateStatusAsync till HasCompleted is true, then return the final result of the operation.

Applies to