public ConfigurationTabViewModel( IPersistedRunnerConfig config, ScenarioRunner runner, IEnumerable<IResultFormatter<ScenarioInRunResult>> formatters, IEventAggregator eventAggregator, ISendMessages sender, ISelectableScenarios scenarios, ISelectableConfigurations configurations, ISelectableFormatters compiledFormatters) { _config = config; _runner = runner; _formatters = formatters; _sender = sender; _scenarios = scenarios; _selectableFormatters = compiledFormatters; _selectableConfigurations = configurations.SelectableConfigurations; foreach (var c in _selectableConfigurations) { c.IsSelected = !_config.IgnoredConfigurations.Contains(c.Name); } foreach (var f in _selectableFormatters.SelectableFormatters) { f.IsSelected = !_config.IgnoredFormatters.Contains(f.Formatter.Name); } foreach (var s in _scenarios.SelectableScenarios) { s.IsSelected = !_config.IgnoredScenarios.Contains(s.Scenario.Name); } NumberOfIterations = config.NumberOfRuns; eventAggregator.Subscribe(this); }
public ConfigurationTabViewModel( IPersistedRunnerConfig config, ScenarioRunner runner, IEnumerable <IResultFormatter <ScenarioInRunResult> > formatters, IEventAggregator eventAggregator, ISendMessages sender, ISelectableScenarios scenarios, ISelectableConfigurations configurations, ISelectableFormatters compiledFormatters) { _config = config; _runner = runner; _formatters = formatters; _sender = sender; _scenarios = scenarios; _selectableFormatters = compiledFormatters; _selectableConfigurations = configurations.SelectableConfigurations; foreach (var c in _selectableConfigurations) { c.IsSelected = !_config.IgnoredConfigurations.Contains(c.Name); } foreach (var f in _selectableFormatters.SelectableFormatters) { f.IsSelected = !_config.IgnoredFormatters.Contains(f.Formatter.Name); } foreach (var s in _scenarios.SelectableScenarios) { s.IsSelected = !_config.IgnoredScenarios.Contains(s.Scenario.Name); } NumberOfIterations = config.NumberOfRuns; eventAggregator.Subscribe(this); }
public OrmPerformanceWindowViewModel( IEnumerable <ITab> tabs, IEventAggregator eventAggregator, IEnumerable <IResultFormatter <ScenarioInRunResult> > formatters, IRunnerConfig config, ScenarioRunner runner, ISendMessages sender, ISelectableFormatters selectableFormatters) { Items.AddRange(tabs); if (tabs.Any()) { ActivateItem(Items.First(t => t.TabTitle == "Configuration")); } _config = config; _runner = runner; _formatters = formatters; _sender = sender; _selectableFormatters = selectableFormatters; eventAggregator.Subscribe(this); }