Operation<T>.WaitForCompletionAsync Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
WaitForCompletionAsync(CancellationToken) |
Periodically calls the server till the long-running operation completes. |
WaitForCompletionAsync(DelayStrategy, CancellationToken) |
Periodically calls the server till the long-running operation completes. |
WaitForCompletionAsync(TimeSpan, CancellationToken) |
Periodically calls the server till the long-running operation completes. |
- Source:
- OperationOfT.cs
Periodically calls the server till the long-running operation completes.
public virtual System.Threading.Tasks.ValueTask<Azure.Response<T>> WaitForCompletionAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member WaitForCompletionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Azure.Response<'T>>
override this.WaitForCompletionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Azure.Response<'T>>
Public Overridable Function WaitForCompletionAsync (Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of 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
- Source:
- OperationOfT.cs
Periodically calls the server till the long-running operation completes.
public virtual System.Threading.Tasks.ValueTask<Azure.Response<T>> WaitForCompletionAsync (Azure.Core.DelayStrategy delayStrategy, System.Threading.CancellationToken cancellationToken);
abstract member WaitForCompletionAsync : Azure.Core.DelayStrategy * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Azure.Response<'T>>
override this.WaitForCompletionAsync : Azure.Core.DelayStrategy * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Azure.Response<'T>>
Public Overridable Function WaitForCompletionAsync (delayStrategy As DelayStrategy, cancellationToken As CancellationToken) As ValueTask(Of 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
- Source:
- OperationOfT.cs
Periodically calls the server till the long-running operation completes.
public virtual System.Threading.Tasks.ValueTask<Azure.Response<T>> WaitForCompletionAsync (TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken);
abstract member WaitForCompletionAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Azure.Response<'T>>
override this.WaitForCompletionAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Azure.Response<'T>>
Public Overridable Function WaitForCompletionAsync (pollingInterval As TimeSpan, cancellationToken As CancellationToken) As ValueTask(Of 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
Azure SDK for .NET feedback
Azure SDK for .NET is an open source project. Select a link to provide feedback: