Table of Contents

Class BlobStorageExtensions

Namespace
FoundationaLLM.Common.Extensions
Assembly
FoundationaLLM.Common.dll

Extends Azure Blob Storage classes with helper methods.

public static class BlobStorageExtensions
Inheritance
BlobStorageExtensions
Inherited Members

Methods

AcquireAsyncWithWait(BlobLeaseClient, TimeSpan, int, int, CancellationToken)

Attempts to acquire a lease on a blob item using a retry pattern.

public static Task<BlobLease?> AcquireAsyncWithWait(this BlobLeaseClient blobLeaseClient, TimeSpan duration, int maxRetryCount = 5, int retryWaitSeconds = 5, CancellationToken cancellationToken = default)

Parameters

blobLeaseClient BlobLeaseClient

The BlobLeaseClient client used to acquire the lease.

duration TimeSpan

The TimeSpan specifying the intended duration of the lease.

maxRetryCount int

The maximum number of attempts to acquire the lease.

retryWaitSeconds int

The number of seconds to wait between subsequent attempts to acquire the lease.

cancellationToken CancellationToken

The CancellationToken that signals the cancellation of the procedure.

Returns

Task<BlobLease>

The BlobLease acquired or null if the acquire operation was not completed.