Exemplo n.º 1
0
 private void SetConfigurationInstanceValues(ServiceSection config)
 {
     Enabled     = config.Enabled.Value;
     Environment = config.Environment.Value;
     TerminateOnRegistrationFailure = config.TerminateOnRegistrationFailure.Value;
     ApiSettings         = new ApiSettings(config.Api.Enabled);
     DisableRegistration = config.DisableRegistration.Value;
 }
Exemplo n.º 2
0
        public ServiceConfiguration(ServiceConfiguration serviceConfiguration)
        {
            var configSection = new ServiceSection
            {
                Enabled = { Value = serviceConfiguration.Enabled },
                TerminateOnRegistrationFailure = { Value = serviceConfiguration.TerminateOnRegistrationFailure },
                Environment = { Value = serviceConfiguration.Environment },
                Api         = new ServiceSection.ApiElement()
                {
                    Enabled = serviceConfiguration.ApiSettings.Enabled
                },
                DisableRegistration = { Value = serviceConfiguration.DisableRegistration }
            };

            SetConfigurationInstanceValues(configSection);
        }