public SessionCreator( ITypesManager typesManager, IOperatorsManager operatorsManager, CommonServices svc, IMessageService reporting) { _typesManager = typesManager; _operatorsManager = operatorsManager; _svc = svc; _reporting = reporting; Events = new Subject<object>(); }
public TeamCityAggregator(IRobot robot) : base("TeamCity Aggregator", robot) { _settings = new List<IPluginSetting> { new PluginSetting(Robot, this, "TeamCityNotifyRoomName"), new PluginSetting(Robot, this, "TeamCityHipchatAuthToken"), new PluginSetting(Robot, this, "TeamCityBuildsMaxDuration") }; _subject = new Subject<TeamCityModel>(); var maxWaitDuration = TimeSpan.FromMinutes(double.Parse(Robot.Settings.Get("TeamCityBuildsMaxDuration"))); _subject .GroupBy(model => model.build.buildNumber) .Subscribe(grp => grp.Buffer(maxWaitDuration, ExpectedBuildCount, Scheduler).Take(1).Subscribe(SendNotification)); Robot.EventEmitter.On<TeamCityModel>("TeamCityBuild", OnTeamCityBuild); }
public EnvironmentConnection(CommandLineParser parser) { _parser = parser; _events = new Subject<EventType>(); }
public SessionController( IDispatcherExecute dispatcher, CommonServices svc, MutantDetailsController mutantDetailsController, IMutantsContainer mutantsContainer, ITestsContainer testsContainer, IFactory<ResultsSavingController> resultsSavingFactory, IFactory<TestingProcess> testingProcessFactory, IRootFactory<TestingMutant> testingMutantFactory, MutationSessionChoices choices) { _dispatcher = dispatcher; _svc = svc; _mutantDetailsController = mutantDetailsController; _mutantsContainer = mutantsContainer; _testsContainer = testsContainer; _resultsSavingFactory = resultsSavingFactory; _testingProcessFactory = testingProcessFactory; _testingMutantFactory = testingMutantFactory; _choices = choices; _sessionState = SessionState.NotStarted; _sessionEventsSubject = new Subject<SessionEventArgs>(); _subscriptions = new List<IDisposable>(); }
public MainController( IObservable<EventType> environmentEvents1, IFactory<OptionsController> optionsController, MainViewModel viewModel, ContinuousConfigurator continuousConfigurator, IOptionsManager optionsManager, IHostEnviromentConnection host, CommonServices svc) { _optionsController = optionsController; _viewModel = viewModel; _continuousConfigurator = continuousConfigurator; _optionsManager = optionsManager; _host = host; _sessionFinished = new Subject<string>(); _controlSource = new Subject<ControlEvent>(); _svc = svc; _viewModel.CommandCreateNewMutants = new SmartCommand(() => RunMutationSession(), () => _viewModel.OperationsState.IsIn(OperationsState.None, OperationsState.Finished, OperationsState.Error)) .UpdateOnChanged(_viewModel, () => _viewModel.OperationsState); _viewModel.CommandPause = new SmartCommand(PauseOperations, () => _viewModel.OperationsState.IsIn(OperationsState.Testing)) .UpdateOnChanged(_viewModel, () => _viewModel.OperationsState); _viewModel.CommandStop = new SmartCommand(StopOperations, () => _viewModel.OperationsState.IsIn(OperationsState.Mutating, OperationsState.PreCheck, OperationsState.Testing, OperationsState.TestingPaused, OperationsState.Pausing)) .UpdateOnChanged(_viewModel, () => _viewModel.OperationsState); _viewModel.CommandContinue = new SmartCommand(ResumeOperations, () => _viewModel.OperationsState == OperationsState.TestingPaused) .UpdateOnChanged(_viewModel, () => _viewModel.OperationsState); _viewModel.CommandSaveResults = new SmartCommand(SaveResults, () => _viewModel.OperationsState == OperationsState.Finished) .UpdateOnChanged(_viewModel, () => _viewModel.OperationsState); _viewModel.CommandOptions = new SmartCommand(() => ShowOptions(), () => _viewModel.OperationsState.IsIn(OperationsState.None, OperationsState.Finished, OperationsState.Error)) .UpdateOnChanged(_viewModel, () => _viewModel.OperationsState); _viewModel.CommandTest = new SmartCommand(Test); _disp = new List<IDisposable> { environmentEvents1 .Where(e => e == EventType.HostOpened) .Subscribe(type => { Initialize(); continuousConfigurator.CreateConfiguration(); }), environmentEvents1 .Where(e => e == EventType.HostClosed) .Subscribe(type => { continuousConfigurator.DisposeConfiguration(); Deactivate(); }), environmentEvents1 .Where(e => e == EventType.BuildBegin) .Subscribe(type => continuousConfigurator.DisposeConfiguration()), environmentEvents1 .Where(e => e == EventType.BuildDone) .Subscribe(type => continuousConfigurator.CreateConfiguration()), _optionsManager.Events .Where(e => e == OptionsManager.EventType.Updated) .Subscribe(t => { continuousConfigurator.DisposeConfiguration(); continuousConfigurator.CreateConfiguration(); }), }; }
public void Add(Subject pSubject) { _arrayInternal.Add(pSubject); }