Class CopyFromUriOperation
An Azure.Operation for tracking the status of a StartCopyFromUriAsync(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) request. Its Azure.Operation`1.Value upon successful completion will be the number of bytes copied.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Blobs.dll
Syntax
public class CopyFromUriOperation : Azure.Operation<long>
Constructors
CopyFromUriOperation()
Initializes a new CopyFromUriOperation instance for mocking.
Declaration
protected CopyFromUriOperation ();
CopyFromUriOperation(String, BlobBaseClient)
Initializes a new CopyFromUriOperation instance
Declaration
public CopyFromUriOperation (string id, Azure.Storage.Blobs.Specialized.BlobBaseClient client);
Parameters
System.String
id
The ID of this operation. |
BlobBaseClient
client
The client used to check for completion. |
Properties
HasCompleted
Gets a value indicating whether the operation has completed.
Declaration
public override bool HasCompleted { get; }
Property Value
System.Boolean
|
HasValue
Gets a value indicating whether the operation completed and successfully produced a value. The Azure.Operation`1.Value property is the number of bytes copied by the operation.
Declaration
public override bool HasValue { get; }
Property Value
System.Boolean
|
Id
Gets an ID representing the operation that can be used to poll for the status of the long-running operation.
Declaration
public override string Id { get; }
Property Value
System.String
|
Value
Gets the number of bytes copied by the operation.
Declaration
public override long Value { get; }
Property Value
System.Int64
|
Methods
GetRawResponse()
The last HTTP response received from the server.
Declaration
public override Azure.Response GetRawResponse ();
Returns
Azure.Response
|
Remarks
The last response returned from the server during the lifecycle of this instance.
An instance of OperationT
sends requests to a server in UpdateStatusAsync, UpdateStatus, and other methods.
Responses from these requests can be accessed using GetRawResponse.
UpdateStatus(CancellationToken)
Check for the latest status of the copy operation.
Declaration
public override Azure.Response UpdateStatus (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
The Azure.Response with the status update. |
UpdateStatusAsync(CancellationToken)
Check for the latest status of the copy operation.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public override System.Threading.Tasks.ValueTask<Azure.Response> UpdateStatusAsync (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.ValueTask<Azure.Response>
The Azure.Response with the status update. |
WaitForCompletionAsync(CancellationToken)
Periodically calls the server till the long-running operation completes.
Declaration
public override System.Threading.Tasks.ValueTask<Azure.Response<long>> WaitForCompletionAsync (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
A System.Threading.CancellationToken used for the periodical service calls. |
Returns
System.Threading.Tasks.ValueTask<Azure.Response<System.Int64>>
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.
WaitForCompletionAsync(TimeSpan, CancellationToken)
Periodically calls the server till the long-running operation completes.
Declaration
public override System.Threading.Tasks.ValueTask<Azure.Response<long>> WaitForCompletionAsync (TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken);
Parameters
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. |
Returns
System.Threading.Tasks.ValueTask<Azure.Response<System.Int64>>
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.