public static TEventEmitter RemoveListener <TEventEmitter, T1, T2>( [DisallowNull] this TEventEmitter eventEmitter, [DisallowNull] string eventName, [DisallowNull] Action <T1, T2> listener) where TEventEmitter : IEventEmitter <TEventEmitter> { var wrapper = ListenerWrapper.GetListenerWrapper(listener); wrapper.Decrement(); return(eventEmitter.RemoveListener(eventName, wrapper.Process)); }
public static TEventEmitter Once <TEventEmitter, T1, T2, T3, T4, T5, T6, T7, T8>( [DisallowNull] this TEventEmitter eventEmitter, [DisallowNull] string eventName, [DisallowNull] Action <T1, T2, T3, T4, T5, T6, T7, T8> listener) where TEventEmitter : IEventEmitter <TEventEmitter> => eventEmitter.Once(eventName, ListenerWrapper.GetListenerWrapper(listener).Increment().Process);
public static TEventEmitter Once <TEventEmitter>( [DisallowNull] this TEventEmitter eventEmitter, [DisallowNull] string eventName, [DisallowNull] Delegate listener) where TEventEmitter : IEventEmitter <TEventEmitter> => eventEmitter.Once(eventName, ListenerWrapper.GetListenerWrapper(listener).Increment().Process);