示例#1
0
        public void Remove <T>(ECallback <T> value) where T : AbstractMessage
        {
            var type = typeof(T);

            if (_handlers.ContainsKey(type))
            {
                ((CallbackWrapper <T>)_handlers[type]).Remove(value);
            }
        }
示例#2
0
        public void Add <T>(ECallback <T> value) where T : AbstractMessage
        {
            var type = typeof(T);

            if (!_handlers.ContainsKey(type))
            {
                _handlers.Add(type, new CallbackWrapper <T>());
            }
            ((CallbackWrapper <T>)_handlers[type]).Add(value);
        }
示例#3
0
 public static void SRemove <T>(ECallback <T> value) where T : AbstractMessage
 {
     _instance.Remove(value);
 }
示例#4
0
 public static void SAdd <T>(ECallback <T> value) where T : AbstractMessage
 {
     _instance.Add(value);
 }
示例#5
0
 public void Add(ECallback <T> value)
 {
     _delegates += value;
 }
示例#6
0
 public void Remove(ECallback <T> value)
 {
     _delegates -= value;
 }