public virtual void ReleaseHandler(IMessageHandler handler)
        {
            if (handler == null)
            {
                return;
            }

            if (!handler.IsReusable)
            {
                handler.AttemptDispose();

                return;
            }

            lock (Padlock)
            {
                if (!_releasedHandlers.Contains(handler))
                {
                    _releasedHandlers.Add(handler);
                }
            }
        }
Exemplo n.º 2
0
        public virtual void ReleaseHandler(IMessageHandler handler)
        {
            if (handler == null)
            {
                return;
            }

            if (!handler.IsReusable)
            {
                handler.AttemptDispose();

                return;
            }

            lock (padlock)
            {
                if (!releasedHandlers.Contains(handler))
                {
                    releasedHandlers.Add(handler);
                }
            }
        }