コード例 #1
0
 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);
 }
コード例 #2
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();
        }
コード例 #3
0
        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);
        }