C# Class AzureWebFarm.Helpers.LeaseBlobExtensions

Set of extension methods to add lease functionality until we can upgrade to the newer Azure storage libraries. Based on https://github.com/smarx/WazStorageExtensions pending a pull request we have sent to this project.
Show file Open project: MRCollective/AzureWebFarm

Public Methods

Method Description
AcquireLease ( this blob, int leaseLengthSeconds ) : string
ReleaseLease ( this blob, string leaseId ) : void
RenewLease ( this blob, string leaseId ) : void
SetMetadata ( this blob, string leaseId ) : void
TryAcquireLease ( this blob, int leaseLengthSeconds ) : string
TryReleaseLease ( this blob, string leaseId ) : void

Private Methods

Method Description
DoLeaseOperation ( CloudBlob blob, string leaseId, LeaseAction action ) : void

Method Details

AcquireLease() public static method

public static AcquireLease ( this blob, int leaseLengthSeconds ) : string
blob this
leaseLengthSeconds int
return string

ReleaseLease() public static method

public static ReleaseLease ( this blob, string leaseId ) : void
blob this
leaseId string
return void

RenewLease() public static method

public static RenewLease ( this blob, string leaseId ) : void
blob this
leaseId string
return void

SetMetadata() public static method

public static SetMetadata ( this blob, string leaseId ) : void
blob this
leaseId string
return void

TryAcquireLease() public static method

public static TryAcquireLease ( this blob, int leaseLengthSeconds ) : string
blob this
leaseLengthSeconds int
return string

TryReleaseLease() public static method

public static TryReleaseLease ( this blob, string leaseId ) : void
blob this
leaseId string
return void