Пример #1
0
        public Monitor(ISensor sensor, IIndicator indicator)
        {
            _sensor    = sensor ?? throw new ArgumentNullException(nameof(sensor));
            _indicator = indicator ?? throw new ArgumentNullException(nameof(indicator));

            _sensorSubscription = _sensor.AsObservable().ObserveOn(SynchronizationContext.Current).Subscribe(Update);

            ControlCommand = new ActionCommand("", Control);

            Update(_sensor.GetState());
        }