Example #1
0
 public void Initialize()
 {
     _subscription = new CompositeDisposable(
         _eventAggregator.GetEvent <With.Message.IRegister>().Do(Instrumentation.Store.Storing).Select(_eventTranslator.Translate).Subscribe(Append),
         _eventAggregator.GetEvent <With.Message.IDeregister>().Do(Instrumentation.Store.Storing).Select(_eventTranslator.Translate).Subscribe(Append),
         _eventAggregator.GetEvent <With.Message.IStarted>().Do(Instrumentation.Store.Storing).Select(_eventTranslator.Translate).Subscribe(Append),
         _eventAggregator.GetEvent <With.Message.IStopped>().Do(Instrumentation.Store.Storing).Select(_eventTranslator.Translate).Subscribe(Append),
         _eventAggregator.GetEvent <With.Message.IObservation>().Do(Instrumentation.Store.Storing).Select(_eventTranslator.Translate).Subscribe(Append)
         );
 }
Example #2
0
        public void Initialize()
        {
            _busCoordinator.Start();

            _subscription = new CompositeDisposable(
                _eventAggregator.GetEvent <With.Message.Started>().Subscribe(message => Started()),
                _eventAggregator.GetEvent <With.Message.Stopped>().Subscribe(message => Stopped()),
                _eventAggregator.GetEvent <With.Message.Register>().Subscribe(RegisterDevice),
                _eventAggregator.GetEvent <With.Message.Deregister>().Subscribe(DeregisterDevice)
                );
        }