コード例 #1
0
        public void AddNewSiteConfiguration(AddNewSiteConfigurationDto addNewSiteConfigurationData)
        {
            var siteConfiguration = new SiteConfiguration
            {
                SiteUrl = addNewSiteConfigurationData.SiteUrl,
                SiteStatusCheckIntervalTypeId = addNewSiteConfigurationData.SiteStatusCheckIntervalTypeId,
                SiteStatusCheckInterval       = addNewSiteConfigurationData.SiteStatusCheckInterval,
                LastUpdated = DateTime.UtcNow
            };

            _siteConfigurationRepository
            .AddNewSiteConfiguration(siteConfiguration);

            _unitOfWork.Complete();

            _siteStatusCheckScheduler.Schedule(siteConfiguration);
        }
コード例 #2
0
        public void InitializeSiteStatusChecking()
        {
            var siteConfigurations = _siteConfigurationRepository.ListSiteConfigurations();

            foreach (var siteConfiguration in siteConfigurations)
            {
                _siteStatusCheckScheduler.Schedule(siteConfiguration);
            }
        }