Exemplo n.º 1
0
        public SyncService(WebSiteRepository sitesRepository, CertificateRepository certificateRepository, SyncStatusRepository syncStatusRepository, CloudStorageAccount storageAccount, string localSitesPath, string localTempPath, IEnumerable<string> directoriesToExclude)
        {
            this.sitesRepository = sitesRepository;
            this.certificateRepository = certificateRepository;
            this.syncStatusRepository = syncStatusRepository;

            this.localSitesPath = localSitesPath;
            this.localTempPath = localTempPath;
            this.directoriesToExclude = directoriesToExclude;
            this.entries = new Dictionary<string, FileEntry>();
            this.siteDeployTimes = new Dictionary<string, DateTime>();

            var sitesContainerName = RoleEnvironment.GetConfigurationSettingValue("SitesContainerName").ToLowerInvariant();
            this.container = storageAccount.CreateCloudBlobClient().GetContainerReference(sitesContainerName);
            this.container.CreateIfNotExist();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            try
            {
                var settings = GetSettings();

                var blobStorageService   = new BlobStorageService(settings.StorageAccountCs, settings.ContainerName);
                var tableStorageService  = new TableStorageService(settings.StorageAccountCs, settings.TableName);
                var syncStatusRepository = new SyncStatusRepository();

                var downloadLogic = new DownloaderLogic(blobStorageService, tableStorageService, syncStatusRepository);
                var t             = downloadLogic.RunAsync();
                t.Wait();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            Console.WriteLine("Job done!");
            Console.ReadLine();
        }
Exemplo n.º 3
0
 public SaveSyncStatus(SyncStatusRepository syncStatusRepository)
 {
     _syncStatusRepository = syncStatusRepository;
 }
 public DownloaderLogic(BlobStorageService blobStorageService, TableStorageService tableStorageService, SyncStatusRepository syncStatusRepository)
 {
     _blobStorageService   = blobStorageService;
     _tableStorageService  = tableStorageService;
     _syncStatusRepository = syncStatusRepository;
 }
 public SyncController(SyncStatusRepository syncStatusRepository)
 {
     this.syncStatusRepository = syncStatusRepository;
 }
 public GetLastSynchronisation(SyncStatusRepository syncStatusRepository)
 {
     _syncStatusRepository = syncStatusRepository;
 }
Exemplo n.º 7
0
 public IISManager(string localSitesPath, string tempSitesPath, SyncStatusRepository syncStatusRepository)
 {
     this.syncStatusRepository = syncStatusRepository;
     this.localSitesPath = localSitesPath;
     this.tempSitesPath = tempSitesPath;
 }