Exemplo n.º 1
0
 public void RemoveCommandListener(IZigBeeCommandListener commandListener)
 {
     lock (_lock)
     {
         _commandListeners.Remove(commandListener);
     }
 }
Exemplo n.º 2
0
 public void AddCommandListener(IZigBeeCommandListener commandListener)
 {
     lock (_lock)
     {
         _commandListeners.Add(commandListener);
     }
 }
Exemplo n.º 3
0
        // TODO: REMOVE THIS AFTER FIX MULTI THREADING ISSUES
        public bool HasObject(IZigBeeCommandListener listener)
        {
            foreach (var item in _commandListeners)
            {
                if (item == listener)
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 4
0
        public void RemoveCommandListener(IZigBeeCommandListener commandListener)
        {
            var removed = _commandListeners.TryTake(out commandListener);

            if (!removed)
            {
                var x = "";
            }
            else
            {
                var x = "";
            }
        }
Exemplo n.º 5
0
        public void AddCommandListener(IZigBeeCommandListener commandListener)
        {
            if (commandListener is ZigBeeTransaction)
            {
                var x = "";
            }

            var tmp = commandListener;

            if (_commandListeners.TryPeek(out commandListener))
            {
                // Da im java proj mit HashSet gearbeitet wird -> keine duplicates
                return;
            }

            _commandListeners.Add(tmp);
        }
Exemplo n.º 6
0
 public void RemoveCommandListener(IZigBeeCommandListener commandListener)
 {
     _commandListeners.TryTake(out _);
 }