Skip to main content

Class CreateTaskAndWaitOperation

Operation to follow up progress on a created task.

Assembly: Taskurai.dll
Declaration
public class CreateTaskAndWaitOperation : Operation<TaskResponse>

Inheritance: System.Object -> Azure.Operation -> Azure.Operation<Taskurai.Models.TaskResponse>

Properties

Id

Gets an ID representing the operation that can be used to poll for the status of the long-running operation. There are cases that operation id is not available, we return "NOT_SET" for unavailable operation id.

Declaration
public override string Id { get; }

Value

Final result of the long-running operation.

Declaration
public override TaskResponse Value { get; }

HasCompleted

Returns true if the long-running operation completed.

Declaration
public override bool HasCompleted { get; }

HasValue

Returns true if the long-running operation completed successfully and has produced final result (accessible by Value property).

Declaration
public override bool HasValue { get; }

Methods

GetRawResponse()

The last HTTP response received from the server.

Declaration
public override Response GetRawResponse()
Returns

Azure.Response

UpdateStatus(CancellationToken)

Calls the server to get updated status of the long-running operation.

Declaration
public override Response UpdateStatus(CancellationToken cancellationToken = default)
Returns

Azure.Response: The HTTP response received from the server.

Parameters
TypeNameDescription
System.Threading.CancellationTokencancellationTokenA System.Threading.CancellationToken used for the service call.

UpdateStatusAsync(CancellationToken)

Calls the server to get updated status of the long-running operation.

Declaration
public override ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default)
Returns

System.Threading.Tasks.ValueTask<Azure.Response>: The HTTP response received from the server.

Parameters
TypeNameDescription
System.Threading.CancellationTokencancellationTokenA System.Threading.CancellationToken used for the service call.

WaitForCompletion(CancellationToken)

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

Declaration
public override Response<TaskResponse> WaitForCompletion(CancellationToken cancellationToken = default)
Returns

Azure.Response<Taskurai.Models.TaskResponse>: The last HTTP response received from the server.

Parameters
TypeNameDescription
System.Threading.CancellationTokencancellationTokenA System.Threading.CancellationToken used for the periodical service calls.

WaitForCompletion(TimeSpan, CancellationToken)

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

Declaration
public override Response<TaskResponse> WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default)
Returns

Azure.Response<Taskurai.Models.TaskResponse>: The last HTTP response received from the server.

Parameters
TypeNameDescription
System.TimeSpanpollingIntervalThe 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.
System.Threading.CancellationTokencancellationTokenA System.Threading.CancellationToken used for the periodical service calls.

WaitForCompletionAsync(CancellationToken)

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

Declaration
public override ValueTask<Response<TaskResponse>> WaitForCompletionAsync(CancellationToken cancellationToken = default)
Returns

System.Threading.Tasks.ValueTask<Azure.Response<Taskurai.Models.TaskResponse>>: The last HTTP response received from the server.

Parameters
TypeNameDescription
System.Threading.CancellationTokencancellationTokenA System.Threading.CancellationToken used for the periodical service calls.

WaitForCompletionAsync(TimeSpan, CancellationToken)

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

Declaration
public override ValueTask<Response<TaskResponse>> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default)
Returns

System.Threading.Tasks.ValueTask<Azure.Response<Taskurai.Models.TaskResponse>>: The last HTTP response received from the server.

Parameters
TypeNameDescription
System.TimeSpanpollingIntervalThe 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.
System.Threading.CancellationTokencancellationTokenA System.Threading.CancellationToken used for the periodical service calls.