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);
		}
Esempio n. 2
0
        static CloudPageBlob GetBlob(ICloudFactory cloudBlobClient)
        {
            var container = cloudBlobClient.GetSysContainerReference();

            var blob = container.GetPageBlobReference(Constants.MasterDataFileName);

            return(blob);
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
        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));
        }
Esempio n. 6
0
		static CloudPageBlob GetBlob(ICloudFactory cloudBlobClient) {
			var container = cloudBlobClient.GetSysContainerReference();

			var blob = container.GetPageBlobReference(Constants.MasterDataFileName);
			return blob;
		}