Ejemplo n.º 1
0
        static void PerformSend(string identifier, Type argType, object args)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            var key = new MessageSignature(identifier, argType);

            if (!Callbacks.ContainsKey(key))
            {
                return;
            }

            var actions = Callbacks [key];

            if (actions == null || !actions.Any())
            {
                return;
            }

            foreach (var action in actions)
            {
                if (action.Item1.Target != null && actions.Contains(action))
                {
                    action.Item2(args);
                }
            }
        }