Пример #1
0
 /// <inheritdoc/>
 public override void Unsubscribe(Type eventType, IEventHandler handler)
 {
     GetOrCreateHandlerFactories(eventType)
     .Locking(factories =>
     {
         factories.RemoveAll(
             factory =>
             factory is SingleInstanceHandlerFactory &&
             (factory as SingleInstanceHandlerFactory).HandlerInstance == handler
             );
     });
 }
Пример #2
0
 public abstract void Unsubscribe(Type eventType, IEventHandler handler);
Пример #3
0
 /// <inheritdoc/>
 public virtual IDisposable Subscribe(Type eventType, IEventHandler handler)
 {
     return(Subscribe(eventType, new SingleInstanceHandlerFactory(handler)));
 }