private void OnAuthenticate(bool success, JToken token)
 {
     if (!success)
     {
         this._connected = false;
         JetBusException exception = new JetBusException(token);
         _mException = new Exception(exception.Error.ToString());
     }
     _mSuccessEvent.Set();
 }
        private void OnSet(bool success, JToken token)
        {
            if (!success)
            {
                JetBusException exception = new JetBusException(token);
                _mException = new Exception(exception.Error.ToString());
            }

            _mSuccessEvent.Set();

            BusActivityDetection?.Invoke(this, new LogEvent("Set data" + success));
        }
        private void OnFetch(bool success, JToken token)
        {
            if (!success)
            {
                this._connected = false;

                JetBusException exception = new JetBusException(token);
                _mException = new Exception(exception.Error.ToString());
            }
            //
            // Wake up the waiting thread where call the construktor to connect the session
            //

            this._connected = true;
            _mSuccessEvent.Set();

            BusActivityDetection?.Invoke(this, new LogEvent("Fetch-All success: " + success + " - buffersize is " + _dataJTokenBuffer.Count));
        }