예제 #1
0
        public DirectorySync(KeyData key, string cloudShareName, DirectoryInfo directoryToSync, ILogger logger)
        {
            var storageAccount = new CloudStorageAccount(new StorageCredentials(key.Account, key.PrivateKey), true);
            var fileClient     = storageAccount.CreateCloudFileClient();
            var fileShare      = fileClient.GetShareReference(cloudShareName);

            fileShare.CreateIfNotExists();
            Initialize(fileShare.GetRootDirectoryReference(), directoryToSync, logger);
        }
예제 #2
0
 public DirectorySync(KeyData key, string cloudShareName, string directoryToSync)
     : this(key, cloudShareName, new DirectoryInfo(directoryToSync), new NoLogger())
 {
 }