public static void BreakContainerLeaseImmediately( SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS, SqlString containerName, SqlInt32 timeoutSeconds, SqlGuid xmsclientrequestId) { AzureBlobService abs = new AzureBlobService(accountName.Value, sharedKey.Value, useHTTPS.Value); Container cont = abs.GetContainer(containerName.Value); Responses.LeaseBlobResponse lbr = cont.BreakLeaseImmediately( timeoutSeconds.IsNull ? 0 : timeoutSeconds.Value, xmsclientrequestId.IsNull ? (Guid?)null : xmsclientrequestId.Value); PushLeaseBlobResponse(lbr); }
public static void AcquireContainerInfiniteLease( SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS, SqlString containerName, SqlGuid proposedLeaseId, SqlInt32 timeoutSeconds, SqlGuid xmsclientrequestId) { AzureBlobService abs = new AzureBlobService(accountName.Value, sharedKey.Value, useHTTPS.Value); Container cont = abs.GetContainer(containerName.Value); Responses.LeaseBlobResponse lbr = cont.AcquireInfiniteLease( proposedLeaseId.IsNull ? (Guid?)null : proposedLeaseId.Value, timeoutSeconds.IsNull ? 0 : timeoutSeconds.Value, xmsclientrequestId.IsNull ? (Guid?)null : xmsclientrequestId.Value); PushLeaseBlobResponse(lbr); }
public static void RenewBlobLease( SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS, SqlString containerName, SqlString blobName, SqlGuid leaseId, SqlInt32 timeoutSeconds, SqlGuid xmsclientrequestId) { AzureBlobService abs = new AzureBlobService(accountName.Value, sharedKey.Value, useHTTPS.Value); Container cont = abs.GetContainer(containerName.Value); Blob blob = cont.GetBlob(blobName.Value); Responses.LeaseBlobResponse lbr = blob.RenewLease( leaseId.IsNull ? Guid.Empty : leaseId.Value, timeoutSeconds.IsNull ? 0 : timeoutSeconds.Value, xmsclientrequestId.IsNull ? (Guid?)null : xmsclientrequestId.Value); PushLeaseBlobResponse(lbr); }