Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AlarmWorkflowEngine"/> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <param name="serviceProvider"></param>
        /// <param name="settings"></param>
        public AlarmWorkflowEngine(Configuration configuration, IServiceProvider serviceProvider, ISettingsServiceInternal settings)
            : this()
        {
            Assertions.AssertNotNull(configuration, "configuration");
            Assertions.AssertNotNull(serviceProvider, "serviceProvider");
            Assertions.AssertNotNull(settings, "settings");

            _configuration = configuration;
            _serviceProvider = serviceProvider;
            _settingsService = settings;
        }
 private static Configuration LoadConfiguration(ISettingsServiceInternal settings)
 {
     Configuration configuration = new Configuration();
     configuration.EnabledAlarmSources = new ReadOnlyCollection<string>(settings.GetSetting(SettingKeys.AlarmSourcesConfigurationKey).GetValue<ExportConfiguration>().GetEnabledExports());
     return configuration;
 }