public WindowsLogger()
        {
            _channel = new LoggingChannel("BackpackPlannerChannel", null);
            _session = new LoggingSession("BackpackPlannerSession");

            _session.AddLoggingChannel(_channel);
        }
        public MockDeviceService(Subject <GaugePositionDTO> mockSource, ILoggingSession loggingSession) : base(loggingSession)
        {
            loggingSession.AddLoggingChannel(_loggingChannel);

            _mockSource = mockSource;
            DataStream  = _mockSource.AsObservable();
        }
        public SerialDeviceService(ILoggingSession loggingSession) : base(loggingSession)
        {
            loggingSession.AddLoggingChannel(_loggingChannel);

            InitializeTokens();
            _dataSourceSubject = new Subject <GaugePositionDTO>();
            DataStream         = _dataSourceSubject.AsObservable();
        }
Example #4
0
        protected BaseConnectionService(ILoggingSession loggingSession)
        {
            loggingSession.AddLoggingChannel(_loggingChannel);

            _diagnosticEvents = new List <DiagnosticEvent>();

            _diagnosticEventsSubject = new ReplaySubject <DiagnosticEvent>(int.MaxValue);
            _diagnosticEventsSubject.Subscribe(@event =>
            {
                // _loggingChannel.LogMessage();
                _diagnosticEvents.Add(@event);
            });
        }