/// <inheritdoc/> public override void Unsubscribe(Type eventType, IEventHandler handler) { GetOrCreateHandlerFactories(eventType) .Locking(factories => { factories.RemoveAll( factory => factory is SingleInstanceHandlerFactory && (factory as SingleInstanceHandlerFactory).HandlerInstance == handler ); }); }
public abstract void Unsubscribe(Type eventType, IEventHandler handler);
/// <inheritdoc/> public virtual IDisposable Subscribe(Type eventType, IEventHandler handler) { return(Subscribe(eventType, new SingleInstanceHandlerFactory(handler))); }