Megosztás a következőn keresztül:


ShareLeaseClient.Break(CancellationToken) Method

Definition

The Break(CancellationToken) operation breaks the files's previously-acquired lease (if it exists).

Once a lease is broken, it cannot be renewed. Any authorized request can break the lease; the request is not required to specify a matching lease ID.

A lease that has been broken can also be released. A client can immediately acquire a file lease that has been released.

public virtual Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileLease> Break (System.Threading.CancellationToken cancellationToken = default);
abstract member Break : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileLease>
override this.Break : System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileLease>
Public Overridable Function Break (Optional cancellationToken As CancellationToken = Nothing) As Response(Of ShareFileLease)

Parameters

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the broken lease.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to