예제 #1
0
 /// <summary>
 /// Puts the lease on the given blob in a leased state.
 /// </summary>
 /// <param name="blob">The blob with the lease.</param>
 /// <param name="leaseTime">The amount of time on the new lease.</param>
 /// <returns>The lease ID of the current lease.</returns>
 internal static string SetLeasedState(CloudBlob blob, TimeSpan? leaseTime)
 {
     string leaseId = Guid.NewGuid().ToString();
     SetAvailableState(blob);
     return blob.AcquireLease(leaseTime, leaseId);
 }