Share via


EmailSendOperation.WaitForCompletion Method

Definition

Overloads

WaitForCompletion(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:
EmailSendOperation.cs

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

public override Azure.Response<Azure.Communication.Email.EmailSendResult> WaitForCompletion (System.Threading.CancellationToken cancellationToken = default);
override this.WaitForCompletion : System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Email.EmailSendResult>
Public Overrides Function WaitForCompletion (Optional cancellationToken As CancellationToken = Nothing) As Response(Of EmailSendResult)

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(TimeSpan, CancellationToken)

Source:
EmailSendOperation.cs

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

public override Azure.Response<Azure.Communication.Email.EmailSendResult> WaitForCompletion (TimeSpan suggestedPollingInterval, System.Threading.CancellationToken cancellationToken);
override this.WaitForCompletion : TimeSpan * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Email.EmailSendResult>
Public Overrides Function WaitForCompletion (suggestedPollingInterval As TimeSpan, cancellationToken As CancellationToken) As Response(Of EmailSendResult)

Parameters

suggestedPollingInterval
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. In that case, it uses the larger of the values between this value and the one returned from the server.

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 UpdateStatus till HasCompleted is true, then return the final result of the operation.

Applies to