public SessionTimestampLogger(string timestampFilePath, SessionInfoProvider sessionInfoProvider, EventSaver eventSaver, ILog log)
            : base(nameof(SessionTimestampLogger), log)
        {
            _timestampFilePath   = timestampFilePath;
            _sessionInfoProvider = sessionInfoProvider;
            _eventSaver          = eventSaver;

            _timestampSaveTimer.Elapsed += TimestampSaveTimer_Elapsed;

            var savedTimestamp = GetSavedTimestamp();

            if (savedTimestamp != null)
            {
                GenerateSessionEndEvent(savedTimestamp);
                ClearSavedTimestamp();
            }

            SessionSwitchMonitor.SessionSwitch += SessionSwitchMonitor_SessionSwitch;

            var state = WorkstationHelper.GetSessionLockState(WorkstationHelper.GetSessionId());

            if (state == WorkstationHelper.LockState.Unlocked)
            {
                SaveOrUpdateTimestamp(CreateNewTimestamp());
                _timestampSaveTimer.Start();
            }
        }
        public SessionSwitchLogger(EventSaver eventSaver,
                                   SessionUnlockMethodMonitor sessionUnlockMethodMonitor,
                                   WorkstationLockProcessor workstationLockProcessor,
                                   BleDeviceManager bleDeviceManager,
                                   ILog log)
            : base(nameof(SessionSwitchLogger), log)
        {
            _eventSaver = eventSaver;
            _sessionUnlockMethodMonitor = sessionUnlockMethodMonitor;
            _workstationLockProcessor   = workstationLockProcessor;
            _bleDeviceManager           = bleDeviceManager;

            _workstationLockProcessor.WorkstationLocking += WorkstationLockProcessor_WorkstationLocking;
            SessionSwitchMonitor.SessionSwitch           += SessionSwitchMonitor_SessionSwitch;
        }