internal void RegisterAllEventHandler(CrtpEventCallback crtpEventCallback)
 {
     lock (_lock)
     {
         _eventCallbacksAll.Add(crtpEventCallback);
     }
 }
        internal void RemoveEventHandler(byte port, CrtpEventCallback crtpEventCallback)
        {
            lock (_lock)
            {
                if (!_eventCallbacksSpecificPort.ContainsKey(port))
                {
                    return;
                }

                _eventCallbacksSpecificPort[port].Remove(crtpEventCallback);
            }
        }
        internal void RegisterEventHandler(byte port, CrtpEventCallback crtpEventCallback)
        {
            lock (_lock)
            {
                if (!_eventCallbacksSpecificPort.ContainsKey(port))
                {
                    IList <CrtpEventCallback> handlers = new List <CrtpEventCallback>();
                    _eventCallbacksSpecificPort[port] = handlers;
                }

                _eventCallbacksSpecificPort[port].Add(crtpEventCallback);
            }
        }
 public void RemoveEventHandler(byte port, CrtpEventCallback crtpEventCallback)
 {
     _crtpEventRegistry.RemoveEventHandler(port, crtpEventCallback);
 }
 public void RegisterAllEventHandler(CrtpEventCallback crtpEventCallback)
 {
     _crtpEventRegistry.RegisterAllEventHandler(crtpEventCallback);
 }