Class CreateTaskAndWaitOperation
Operation to follow up progress on a created task.
Assembly: Taskurai.dll
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.
public override string Id { get; }
Value
Final result of the long-running operation.
public override TaskResponse Value { get; }
HasCompleted
Returns true if the long-running operation completed.
public override bool HasCompleted { get; }
HasValue
Returns true if the long-running operation completed successfully and has produced final result (accessible by Value property).
public override bool HasValue { get; }
Methods
GetRawResponse()
The last HTTP response received from the server.
public override Response GetRawResponse()
Returns
Azure.Response
UpdateStatus(CancellationToken)
Calls the server to get updated status of the long-running operation.
public override Response UpdateStatus(CancellationToken cancellationToken = default)
Returns
Azure.Response
: The HTTP response received from the server.
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken used for the service call. |
UpdateStatusAsync(CancellationToken)
Calls the server to get updated status of the long-running operation.
public override ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default)
Returns
System.Threading.Tasks.ValueTask<Azure.Response>
: The HTTP response received from the server.
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken used for the service call. |
WaitForCompletion(CancellationToken)
Periodically calls the server till the long-running operation completes.
public override Response<TaskResponse> WaitForCompletion(CancellationToken cancellationToken = default)
Returns
Azure.Response<Taskurai.Models.TaskResponse>
: The last HTTP response received from the server.
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken used for the periodical service calls. |
WaitForCompletion(TimeSpan, CancellationToken)
Periodically calls the server till the long-running operation completes.
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
Type | Name | Description |
---|---|---|
System.TimeSpan | pollingInterval | 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. | ||
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken used for the periodical service calls. |
WaitForCompletionAsync(CancellationToken)
Periodically calls the server till the long-running operation completes.
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
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken used for the periodical service calls. |
WaitForCompletionAsync(TimeSpan, CancellationToken)
Periodically calls the server till the long-running operation completes.
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
Type | Name | Description |
---|---|---|
System.TimeSpan | pollingInterval | 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. | ||
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken used for the periodical service calls. |