Exemple #1
0
        protected virtual void OnConnectEvent()
        {
            //Logger.Debug("OnConnectEvent");

            OnConnectEventHandler handler = ConnectEvent;

            handler?.Invoke();
        }
Exemple #2
0
        protected virtual void RaiseConnectEvent(StateObject state)
        {
            //Logger.Debug("OnConnectEvent");
            //Logger.Trace(state);

            OnConnectEventHandler handler = ConnectEvent;

            handler?.Invoke(state);
        }
        /// <summary>
        /// Handle connect event
        /// </summary>
        /// <param name="response">The TP Pair Response</param>
        private void HandlePairEvent(PairResponse response)
        {
            // Good pairing message returned
            if (!string.IsNullOrEmpty(response?.PluginVersion))
            {
                IsPaired = true;

                OnConnectEventHandler?.Invoke();
            }
        }
Exemple #4
0
 public void RemoveOnConnect(OnConnectEventHandler func)
 {
     this.OnConnect -= func;
 }
Exemple #5
0
 public void AddOnConnect(OnConnectEventHandler func)
 {
     this.OnConnect += func;
 }