Example #1
0
        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 UIProfilerSessionDispatcher(Dispatcher dispatcher, IProfilerSession profilerSession)
 {
     _dispatcher      = dispatcher;
     _profilerSession = profilerSession;
 }
 public UIProfilerSessionDispatcher(Dispatcher dispatcher, IProfilerSession profilerSession)
 {
     _dispatcher = dispatcher;
     _profilerSession = profilerSession;
 }