Example #1
0
        public void UpdateSiteConfiguration(UpdateSiteConfigurationDto updateSiteConfigurationData)
        {
            var siteConfiguration = _siteConfigurationRepository
                                    .GetSiteConfigurationById(updateSiteConfigurationData.Id);

            if (siteConfiguration != null)
            {
                siteConfiguration.SiteUrl = updateSiteConfigurationData.SiteUrl;
                siteConfiguration.SiteStatusCheckIntervalTypeId = updateSiteConfigurationData.SiteStatusCheckIntervalTypeId;
                siteConfiguration.SiteStatusCheckInterval       = updateSiteConfigurationData.SiteStatusCheckInterval;
                siteConfiguration.LastUpdated = DateTime.UtcNow;

                _siteConfigurationRepository
                .EditSiteConfiguration(siteConfiguration);
                _unitOfWork.Complete();

                _siteStatusCheckScheduler.Schedule(siteConfiguration);
            }
        }