⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dispatcherfilter.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace NCindy.Filter
{
    using NCindy;
    using NCindy.Session.Dispatcher;
    using System;

    public class DispatcherFilter : ISessionFilter
    {
        private readonly IDispatcher dispatcher;

        public DispatcherFilter(IDispatcher dispatcher)
        {
            this.dispatcher = dispatcher;
        }

        public void ExceptionCaught(ISessionFilterChain filterChain, Exception cause)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
            });
        }

        public void ObjectReceived(ISessionFilterChain filterChain, object obj)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.ObjectReceived(obj);
            });
        }

        public void ObjectSent(ISessionFilterChain filterChain, object obj)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.ObjectSent(obj);
            });
        }

        public void PacketReceived(ISessionFilterChain filterChain, IPacket packet)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.PacketReceived(packet);
            });
        }

        public void PacketSend(ISessionFilterChain filterChain, IPacket packet)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.PacketSend(packet);
            });
        }

        public void PacketSent(ISessionFilterChain filterChain, IPacket packet)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.PacketSent(packet);
            });
        }

        public void SessionStateChanged(ISessionFilterChain filterChain)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.SessionStateChanged();
            });
        }

        public void SessionTimeout(ISessionFilterChain filterChain)
        {
            this.dispatcher.Dispatch(filterChain.Session, delegate {
                filterChain.SessionTimeout();
            });
        }

        public IDispatcher Dispatcher
        {
            get
            {
                return this.dispatcher;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -