<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0-beta.2" />

IOperation<T>

interface IOperation<T>
An interface used by OperationInternal<T> for making service calls and updating state. It's expected that your long-running operation classes implement this interface.
ValueTask<OperationState<T>> UpdateStateAsync(bool async, CancellationToken cancellationToken)

Calls the service and updates the state of the long-running operation. Properties directly handled by the OperationInternal<T> class, such as RawResponse or Value, don't need to be updated. Operation-specific properties, such as "CreateOn" or "LastModified", must be manually updated by the operation implementing this method. Usage example: async ValueTask<OperationState<T>> IOperation<T>.UpdateStateAsync(bool async, CancellationToken cancellationToken) { Response<R> response = async ? <async service call> : <sync service call>; if (<operation succeeded>) return OperationState<T>.Success(response.GetRawResponse(), <parse response>); if (<operation failed>) return OperationState<T>.Failure(response.GetRawResponse()); return OperationState<T>.Pending(response.GetRawResponse()); }