Exemplo n.º 1
0
        public void AddChannelMessageDelegate(string channel, MethodChannelMessageDelegate del)
        {
            MethodChannelMessageDelegate exists;

            _methodChannelMessageDelegates.TryGetValue(channel, out exists);
            _methodChannelMessageDelegates[channel] = exists + del;
        }
Exemplo n.º 2
0
        public void RemoveChannelMessageDelegate(string channel, MethodChannelMessageDelegate del)
        {
            MethodChannelMessageDelegate exists;

            _methodChannelMessageDelegates.TryGetValue(channel, out exists);
            if (exists != null)
            {
                _methodChannelMessageDelegates[channel] = exists - del;
            }
        }