public void Register(IAsyncEventHandler handler) { if (handler == null) { return; } lock (SyncLock) Dependencies.Add(handler.GetWeakReference()); }
/// <inheritdoc/> public IDisposable AsyncRegister <TEventData>(IAsyncEventHandler <TEventData> handler) where TEventData : IEventData { return(Register(typeof(TEventData), handler)); }
/// <inheritdoc/> public void AsyncUnregister <TEventData>(IAsyncEventHandler <TEventData> handler) where TEventData : IEventData { Unregister(typeof(TEventData), handler); }
/// <inheritdoc/> public void AsyncUnregister <TEventData>(IAsyncEventHandler <TEventData> handler) where TEventData : IEventData { }
/// <inheritdoc/> public IDisposable AsyncRegister <TEventData>(IAsyncEventHandler <TEventData> handler) where TEventData : IEventData { return(NullDisposable.Instance); }
public EventContainer(IAsyncFd asyncFd, IAsyncType asyncType, IAsyncEventHandler asyncEventHandler) { this._asyncFd = asyncFd; this._asyncType = asyncType; this._asyncEventHandler = asyncEventHandler; }
public override void add(IAsyncFd asyncFd, IAsyncType asyncType, IAsyncEventHandler asyncEventHandler) { _eventContainer = new EventContainer(asyncFd, asyncType, asyncEventHandler); Console.WriteLine("selector add"); }
public void RegisterAsyncEventHandler <TEvent>(IAsyncEventHandler <TEvent> eventHandler) where TEvent : AppEvent { _services.AddSingleton(typeof(IAsyncNotificationHandler <TEvent>), eventHandler); }
public virtual void add(IAsyncFd asyncFd, IAsyncType asyncType, IAsyncEventHandler asyncEventHandler) { _eventContainer = new EventContainer(asyncFd, asyncType, asyncEventHandler); Console.WriteLine("asyncpolling add fd, type, eventhandler"); }
/// <inheritdoc/> public IDisposable AsyncRegister <TEvent>(IAsyncEventHandler <TEvent> handler) where TEvent : class { return(Register(typeof(TEvent), handler)); }
/// <inheritdoc/> public void AsyncUnregister <TEvent>(IAsyncEventHandler <TEvent> handler) where TEvent : class { Unregister(typeof(TEvent), handler); }
public void AsyncUnregister <TEvent>(IAsyncEventHandler <TEvent> handler) where TEvent : class { }
public IDisposable AsyncRegister <TEvent>(IAsyncEventHandler <TEvent> handler) where TEvent : class { return(NullDisposable.Instance); }