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(); }
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(); }
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; }
public IISManager(string localSitesPath, string tempSitesPath, SyncStatusRepository syncStatusRepository) { this.syncStatusRepository = syncStatusRepository; this.localSitesPath = localSitesPath; this.tempSitesPath = tempSitesPath; }