public EventsViewModel(IDispatcher dispacher, IApplicationEventBus eventBus, INavigator navigator, IPreDisplayEventViewItemStore preDisplayEventViewItemStore) { if (dispacher == null) { throw new ArgumentNullException("dispacher"); } if (eventBus == null) { throw new ArgumentNullException("eventBus"); } if (navigator == null) { throw new ArgumentNullException("navigator"); } if (preDisplayEventViewItemStore == null) { throw new ArgumentNullException("preDisplayEventViewItemStore"); } _dispacher = dispacher; _eventBus = eventBus; _navigator = navigator; PauseResume = new RelayCommand(OnPauseResume); Clear = new RelayCommand(OnClear); _dispacher.Background(() => { _eventBus.Subscribe(this); preDisplayEventViewItemStore.Unload(this); }); }
public TokenController(IApplicationEventBus eventBus, ICapPublisher capBus, IOptions <JwtSettings> jwtSettingsAccesser, ILoginService loginService) { _jwtSettings = jwtSettingsAccesser.Value; _loginService = loginService; _publishEventBus = eventBus; _capBus = capBus; }
public ComponentsViewModel( INavigator navigator, IHistoricalItemStore <Component> components, IHistoricalItemStore <RegistrationSource> registrationSources, IApplicationEventBus applicationEventBus, IDispatcher dispatcher) { _navigator = navigator; _applicationEventBus = applicationEventBus; _dispatcher = dispatcher; _filteredSortedComponents = new ListCollectionView(_components); _filteredSortedComponents.SortDescriptions.Add(new SortDescription("Description", ListSortDirection.Ascending)); dispatcher.Background(() => { _applicationEventBus.Subscribe(this); var vms = new List <object>(); vms.AddRange(components.GetItems().Select(CreateViewModel)); vms.AddRange(registrationSources.GetItems().Select(CreateViewModel)); dispatcher.Foreground(() => { foreach (var vm in vms) { _components.Add(vm); } }); }); }
private S3StoreFactory(IConfigurationProvider configuration, IApplicationEventBus applicationEventBus) { _config = configuration; if (Interlocked.Exchange(ref isApplicationEventRegistered, 1) == 0) { applicationEventBus.Register("in-memory-consul-cache-refresh", this); } }
public Log4Helper(IApplicationEventBus applicationEventBus) { this._stopWatch = new Stopwatch(); if (_monitorLog == null) { this._monitorLog = new MonitorLog(); } //_publishEventBus = publishEventBus; _applicationEventBus = applicationEventBus; }
public SessionViewModel( IProfilerSession profilerSession, IApplicationEventBus eventBus, IDispatcher dispatcher, IComponentContext componentContext) { if (profilerSession == null) { throw new ArgumentNullException("profilerSession"); } if (eventBus == null) { throw new ArgumentNullException("eventBus"); } if (componentContext == null) { throw new ArgumentNullException("componentContext"); } _profilerSession = profilerSession; _eventBus = eventBus; _dispatcher = dispatcher; _componentContext = componentContext; NavigateBack = new RelayCommand(GoBack, () => _navigationJournal.CanGoBack); GoToEvents = new RelayCommand(Navigate <EventsView>, () => _isConnected); GoToComponents = new RelayCommand(Navigate <ComponentsView>, () => _isConnected); GoToAnalysis = new RelayCommand(Navigate <AnalysisView>, () => _isConnected); _navigationJournal.PropertyChanged += (s, e) => { if (e.PropertyName == "Current") { NotifyPropertyChanged("CurrentViewContent"); NotifyPropertyChanged("Title"); NotifyPropertyChanged("PreviousTitle"); } }; eventBus.Subscribe(this); Navigate <WaitingView>(); }
public ConfigurationUpdateEventHandler(IConfigurationStore remoteConfigurationStore, IApplicationEventBus applicationEventBus, ISensitiveDataProvider sensitiveDataProvider) { _configurationStore = new SecureConfigurationStore(remoteConfigurationStore, sensitiveDataProvider); _applicationEventBus = applicationEventBus; }