CloudBlobContainer.BeginChangeLease Method (String, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, Object)

 

Updated: September 27, 2016

Begins an asynchronous operation to change the lease on this container.

Namespace:   Microsoft.WindowsAzure.Storage.Blob
Assembly:  Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)

public virtual ICancellableAsyncResult BeginChangeLease(
	string proposedLeaseId,
	AccessCondition accessCondition,
	BlobRequestOptions options,
	OperationContext operationContext,
	AsyncCallback callback,
	object state
)

Parameters

proposedLeaseId
Type: System.String

A string representing the proposed lease ID for the new lease. This cannot be null.

accessCondition
Type: Microsoft.WindowsAzure.Storage.AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.

options
Type: Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext
Type: Microsoft.WindowsAzure.Storage.OperationContext

An OperationContext object that represents the context for the current operation.

callback
Type: System.AsyncCallback

An optional callback delegate that will receive notification when the asynchronous operation completes.

state
Type: System.Object

A user-defined object that will be passed to the callback delegate.

Return Value

Type: Microsoft.WindowsAzure.Storage.ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

System_CAPS_noteNote

Microsoft recommends that you call asynchronous methods in your code whenever possible for optimal performance. The recommended methods are those that use the Async/Await pattern. For more information about asynchronous programming in .NET with Async/Await, see Asynchronous Programming with Async and Await (C# and Visual Basic).

The corresponding method that uses Async/Await is ChangeLeaseAsync.

Return to top
Show: