Пример #1
0
        /// <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);
        }
Пример #2
0
//======================================================
        /// <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));
        }
Пример #3
0
        /// <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);
        }
Пример #4
0
//============================================
        /// <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));
        }
Пример #5
0
 /// <inheritdoc />
 public void Remove <TCallBackValue, TEventHub, TSendValue>(
     EventHub <TCallBackValue, TEventHub, TSendValue> .IHandler handler)
     where TEventHub : EventHub <TCallBackValue, TEventHub, TSendValue>
 {
 }