private IFileStore CreateAzureBlobStorageStore(StatefulServiceContext context)
        {
            var backupRestoreConfiguration = new AzureBackupRestoreConfiguration(context);
            var partitionName = context.GetCurrentPartitionInfos().Result.InternalName;
            var backupStore   = new AzureBlobStorageStore(backupRestoreConfiguration,
                                                          context.GetSystemServiceName(),
                                                          partitionName, context.CodePackageActivationContext.TempDirectory);

            return(backupStore);
        }
        public AzureBlobStorageStore(AzureBackupRestoreConfiguration backupRestoreConfiguration,
                                     string systemservicename, string partitionName, string temporaryDirectory)
        {
            _backupRestoreConfiguration = backupRestoreConfiguration;
            _systemservicename          = systemservicename;
            _partitionName      = partitionName;
            _temporaryDirectory = temporaryDirectory;

            CloudStorageAccount storageAccount =
                CloudStorageAccount.Parse(_backupRestoreConfiguration.BackupStorageConnectionString);

            _blobClient = storageAccount.CreateCloudBlobClient();
        }