示例#1
0
        protected void InvokeMessage(OSCMessage message)
        {
            if (message == null)
            {
                return;
            }

            _bindStack.Clear();
            _bindStack.Clear();

            _processMessage = true;

            foreach (var bind in bindings)
            {
                if (bind == null)
                {
                    continue;
                }

                if (OSCUtilities.CompareAddresses(bind.ReceiverAddress, message.Address))
                {
                    if (bind.Callback != null)
                    {
                        bind.Callback.Invoke(message);
                    }
                }
            }

            _processMessage = false;

            while (_bindStack.Count > 0)
            {
                Bind(_bindStack.Pop());
            }

            while (_unbindStack.Count > 0)
            {
                Unbind(_unbindStack.Pop());
            }
        }
        protected void InvokeMessage(OSCMessage message)
        {
            if (message == null)
            {
                return;
            }

            foreach (var bind in bindings)
            {
                if (bind == null)
                {
                    continue;
                }

                if (OSCUtilities.CompareAddresses(bind.ReceiverAddress, message.Address))
                {
                    if (bind.Callback != null)
                    {
                        bind.Callback.Invoke(message);
                    }
                }
            }
        }