private void OnAuthenticateFetchAll(bool authenticationSuccess, JToken token)
 {
     if (authenticationSuccess)
     {
         CommunicationLog?.Invoke(this, new LogEventArgs("Authentication successful"));
         FetchAll();
     }
     else
     {
         JetBusException exception = new JetBusException(token);
         _localException = new Exception(exception.Message);
         _successEvent.Set();
     }
 }
        private void OnFetch(bool success, JToken token)
        {
            if (success)
            {
                IsConnected = true;
            }
            else
            {
                JetBusException exception = new JetBusException(token);
                _localException = new Exception(exception.ErrorCode.ToString());
            }

            _successEvent.Set();

            this.UpdateData?.Invoke(this, new EventArgs());

            CommunicationLog?.Invoke(this, new LogEventArgs("Fetch-All success: " + success + " - Buffer size is " + AllData.Count));
        }