Exemple #1
0
        public static void SendEvent(string eventName, TypeOfMessage messageType)
        {
            BroadcasterInner.OnBroadcastMessage(eventName, messageType);
            Delegate type;

            if (tableName.TryGetValue(eventName, out type))
            {
                Call c = type as Call;
                if (c != null)
                {
                    c();
                }
                else
                {
                    throw BroadcasterInner.GenerateMessageException(eventName);
                }
            }
        }
Exemple #2
0
 public static void DisableListener(string eventName, Call handlingMethod)
 {
     BroadcasterInner.OnListenerDisable(eventName, handlingMethod);
     tableName[eventName] = (Call)tableName[eventName] - handlingMethod;
     BroadcasterInner.OnListenerDisabled(eventName);
 }
Exemple #3
0
 public static void EnableListener(string eventName, Call handlingMethod)
 {
     BroadcasterInner.OnListenerEnable(eventName, handlingMethod);
     tableName[eventName] = (Call)tableName[eventName] + handlingMethod;
 }