private void ModifySettings()

in src/PatchOrchestrationApplication/CoordinatorService/src/CoordinatorService.cs [233:293]


        private void ModifySettings(ConfigurationSection configurationSection)
        {
            if (configurationSection != null)
            {
                string paramName = "PollingFrequencyInSec";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.pollingFrequencyInSec = int.Parse(configurationSection.Parameters[paramName].Value);
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.pollingFrequencyInSec);
                }

                paramName = "MaxResultsToCache";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.maxResultsToCache = long.Parse(configurationSection.Parameters[paramName].Value);
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.maxResultsToCache);
                }

                paramName = "TaskApprovalPolicy";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.rmHelper.RmPolicy = (RepairManagerHelper.TaskApprovalPolicy) Enum.Parse(typeof(RepairManagerHelper.TaskApprovalPolicy), configurationSection.Parameters[paramName].Value);
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.rmHelper.RmPolicy.ToString());
                }

                paramName = "InstallOnUpNodesOnly";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.rmHelper.InstallOnUpNodesOnly = bool.Parse(configurationSection.Parameters[paramName].Value);
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.rmHelper.InstallOnUpNodesOnly);
                }

                paramName = "ManageRepairTasksOnTimeout";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.rmHelper.ManageRepairTasksOnTimeout = bool.Parse(configurationSection.Parameters[paramName].Value);
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.rmHelper.ManageRepairTasksOnTimeout);
                }

                paramName = "DefaultTimeoutForOperation";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.rmHelper.DefaultTimeoutForOperation = TimeSpan.FromMinutes(int.Parse(configurationSection.Parameters[paramName].Value));
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.rmHelper.DefaultTimeoutForOperation);
                }

                paramName = "GraceTimeForNtService";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.rmHelper.GraceTimeForNtService = TimeSpan.FromMinutes(int.Parse(configurationSection.Parameters[paramName].Value));
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.rmHelper.GraceTimeForNtService);
                }

                paramName = "MinWaitTimeBetweenNodes";
                if (configurationSection.Parameters.Contains(paramName))
                {
                    this.rmHelper.MinWaitTimeBetweenNodes = TimeSpan.Parse(configurationSection.Parameters[paramName].Value);
                    ServiceEventSource.Current.VerboseMessage("Parameter : {0}, value : {1}", paramName, this.rmHelper.MinWaitTimeBetweenNodes);
                }
            }
        }