次の方法で共有


OperationResult.WaitForCompletion(CancellationToken) Method

Definition

Waits for the operation to complete processing on the service.

public virtual void WaitForCompletion (System.Threading.CancellationToken cancellationToken = default);
abstract member WaitForCompletion : System.Threading.CancellationToken -> unit
override this.WaitForCompletion : System.Threading.CancellationToken -> unit
Public Overridable Sub WaitForCompletion (Optional cancellationToken As CancellationToken = Nothing)

Parameters

cancellationToken
CancellationToken

Exceptions

The cancellationToken was cancelled.

Remarks

Derived types may override WaitForCompletion(CancellationToken) to implement different mechanisms for obtaining updates from the service regarding the progress of the operation. For example, if the derived type polls for status updates, it may provides overloads of WaitForCompletion(CancellationToken) that allow the caller to specify the polling interval or delay strategy used to wait between sending request for updates. By default, WaitForCompletion(CancellationToken) waits a default interval between calling UpdateStatus(RequestOptions) to obtain a status updates, so if updates are delivered via streaming or another mechanism where a wait time is not required, derived types can override this method to update the status more frequently.

Applies to