public void Setup() { this.webSiteTable = new AzureTable<WebSiteRow>(CloudStorageAccount.DevelopmentStorageAccount, "WebSitesTest"); this.bindingTable = new AzureTable<BindingRow>(CloudStorageAccount.DevelopmentStorageAccount, "BindingsTest"); this.certificateRepository = new CertificateRepository(); this.webSiteTable.CreateIfNotExist(); this.bindingTable.CreateIfNotExist(); this.webSiteRepository = new WebSiteRepository(this.webSiteTable, this.bindingTable); this.controller = new WebSiteController(this.webSiteRepository, this.certificateRepository); }
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(); }
public void Setup() { this.webSiteTable = new AzureTable<WebSiteRow>(CloudStorageAccount.DevelopmentStorageAccount, "WebSitesTest"); this.bindingTable = new AzureTable<BindingRow>(CloudStorageAccount.DevelopmentStorageAccount, "BindingsTest"); this.webSiteTable.CreateIfNotExist(); this.bindingTable.CreateIfNotExist(); this.webSiteRepository = new WebSiteRepository(this.webSiteTable, this.bindingTable); this.certificateTable = new AzureTable<CertificateRow>(CloudStorageAccount.DevelopmentStorageAccount, "CertificatesTest"); this.certificateTable.CreateIfNotExist(); this.certificateBlobContainer = new AzureBlobContainer<byte[]>(CloudStorageAccount.DevelopmentStorageAccount, "CertificatesTest"); this.certificateBlobContainer.EnsureExist(); this.certificateRepository = new CertificateRepository(this.certificateTable, this.certificateBlobContainer, this.webSiteRepository); }