public void Unsub <U>(EventType @event, Listener <U> listenerU) { Action action = GetSet.Get(@event); if (listenerU is IListener) { action -= ((IListener)listenerU).Invoke; GetSet.Set(@event, action); } else { LogUnsubWarn(listenerU, @event); } }
public void Unsub <U, T1, T2, T3, T4, T5>(EventType @event, Listener <U> listenerU) { Action <T1, T2, T3, T4, T5> action = GetSet.Get <T1, T2, T3, T4, T5>(@event); if (listenerU is IListener <T1, T2, T3, T4, T5> ) { action -= ((IListener <T1, T2, T3, T4, T5>)listenerU).Invoke; GetSet.Set <T1, T2, T3, T4, T5>(@event, action); } else { LogUnsubWarn(listenerU, @event); } }
public void Sub <U, T1, T2>(EventType @event, Listener <U> listenerU) { Action <T1, T2> action = GetSet.Get <T1, T2>(@event); if (listenerU is IListener <T1, T2> ) { action += ((IListener <T1, T2>)listenerU).Invoke; GetSet.Set <T1, T2>(@event, action); } else { LogSubWarn(listenerU, @event); } }