/// <inheritdoc /> public void Remove <TEventHub, TSendValue>(EventHub <TEventHub, TSendValue> .IHandler handler) where TEventHub : EventHub <TEventHub, TSendValue> { var commandList = GetCommandList(typeof(TEventHub), _handlerStorage); commandList.RemoveAll(com => com.Target == handler); }
//====================================================== /// <inheritdoc /> public void Add <TEventHub, TSendValue>(EventHub <TEventHub, TSendValue> .IHandler handler) where TEventHub : EventHub <TEventHub, TSendValue> { var commandList = GetCommandList(typeof(TEventHub), _handlerStorage); commandList.Add(new WeakReference(handler)); }
/// <inheritdoc /> public void Remove <TEventHub, TSendValue>(EventHub <TEventHub, TSendValue> .IValidate validate) where TEventHub : EventHub <TEventHub, TSendValue> { var type = typeof(TEventHub); GetValidatesList <TEventHub>(type).RemoveAll(obj => obj.IsAlive && obj.Target == validate); }
//============================================ /// <inheritdoc /> public void Add <TEventHub, TSendValue>(EventHub <TEventHub, TSendValue> .IValidate validate) where TEventHub : EventHub <TEventHub, TSendValue> { var type = typeof(TEventHub); GetValidatesList <TEventHub>(type).Add(new WeakReference(validate)); }
/// <inheritdoc /> public void Remove <TCallBackValue, TEventHub, TSendValue>( EventHub <TCallBackValue, TEventHub, TSendValue> .IHandler handler) where TEventHub : EventHub <TCallBackValue, TEventHub, TSendValue> { }