コード例 #1
0
 /// <summary>
 /// Puts the lease on the given blob in a released state.
 /// </summary>
 /// <param name="blob">The blob with the lease.</param>
 /// <param name="leaseTime">The amount of time on the released lease.</param>
 /// <returns>The lease ID of the released lease.</returns>
 internal static async Task<string> SetReleasedStateAsync(CloudBlob blob, TimeSpan? leaseTime)
 {
     string leaseId = await SetLeasedStateAsync(blob, leaseTime);
     await blob.ReleaseLeaseAsync(AccessCondition.GenerateLeaseCondition(leaseId));
     return leaseId;
 }
コード例 #2
0
 /// <summary>
 /// Puts the lease on the given blob in a released state.
 /// </summary>
 /// <param name="blob">The blob with the lease.</param>
 /// <param name="leaseTime">The amount of time on the released lease.</param>
 /// <returns>The lease ID of the released lease.</returns>
 internal static string SetReleasedStateTask(CloudBlob blob, TimeSpan? leaseTime)
 {
     string leaseId = SetLeasedStateAPM(blob, leaseTime);
     blob.ReleaseLeaseAsync(AccessCondition.GenerateLeaseCondition(leaseId)).Wait();
     return leaseId;
 }