public static RenewableBlobLease Create(ICloudFactory account, LeaderTask task) { Require.NotNull("account", account); Require.NotNull("task", task); var container = account.GetSysContainerReference(); var blob = container.GetPageBlobReference(Constants.MasterLockFileName); return new RenewableBlobLease(blob, task); }
static CloudPageBlob GetBlob(ICloudFactory cloudBlobClient) { var container = cloudBlobClient.GetSysContainerReference(); var blob = container.GetPageBlobReference(Constants.MasterDataFileName); return(blob); }
public static RenewableBlobLease Create(ICloudFactory account, LeaderTask task) { Require.NotNull("account", account); Require.NotNull("task", task); var container = account.GetSysContainerReference(); var blob = container.GetPageBlobReference(Constants.MasterLockFileName); return(new RenewableBlobLease(blob, task)); }
public static AuthData LoadFromStorageAccount(ICloudFactory account) { var container = account.GetSysContainerReference(); var blob = container.GetBlockBlobReference(Constants.AuthFileName); if (!blob.Exists()) { return GetEmptyConfig(); } var source = blob.DownloadText(); return AuthData.Deserialize(source); }
public static AuthData LoadFromStorageAccount(ICloudFactory account) { var container = account.GetSysContainerReference(); var blob = container.GetBlockBlobReference(Constants.AuthFileName); if (!blob.Exists()) { return(GetEmptyConfig()); } var source = blob.DownloadText(); return(AuthData.Deserialize(source)); }
static CloudPageBlob GetBlob(ICloudFactory cloudBlobClient) { var container = cloudBlobClient.GetSysContainerReference(); var blob = container.GetPageBlobReference(Constants.MasterDataFileName); return blob; }