Table of Contents

Class SpecializedFileExtensions

Namespace
Azure.Storage.Files.Shares.Specialized
Assembly
Azure.Storage.Files.Shares.dll

Add easy to discover methods to ShareFileClient for easily creating ShareLeaseClient instances.

public static class SpecializedFileExtensions
Inheritance
SpecializedFileExtensions
Inherited Members

Methods

GetShareLeaseClient(ShareClient, string)

Initializes a new instance of the ShareLeaseClient class.

public static ShareLeaseClient GetShareLeaseClient(this ShareClient client, string leaseId = null)

Parameters

client ShareClient

A ShareClient representing the share being leased.

leaseId string

An optional lease ID. If no lease ID is provided, a random lease ID will be created.

Returns

ShareLeaseClient

GetShareLeaseClient(ShareFileClient, string)

Initializes a new instance of the ShareLeaseClient class.

public static ShareLeaseClient GetShareLeaseClient(this ShareFileClient client, string leaseId = null)

Parameters

client ShareFileClient

A ShareFileClient representing the file being leased.

leaseId string

An optional lease ID. If no lease ID is provided, a random lease ID will be created.

Returns

ShareLeaseClient