zoukankan      html  css  js  c++  java
  • WC框架

    ChannelDispatcher 字段

    public class ChannelDispatcher : ChannelDispatcherBase
    {
        // Fields
        private ThreadSafeMessageFilterTable<EndpointAddress> addressTable;
        private string bindingName;
        private SynchronizedCollection<IChannelInitializer> channelInitializers;//通道初始化器
        private CommunicationObjectManager<IChannel> channels;//通道管理器
        private EndpointDispatcherCollection endpointDispatchers;
        private ErrorBehavior errorBehavior;
        private Collection<IErrorHandler> errorHandlers;//错误处理器
        private EndpointDispatcherTable filterTable;
        private ServiceHostBase host;
        private bool includeExceptionDetailInFaults;
        private bool isTransactedReceive;
        private readonly IChannelListener listener;
        private ListenerHandler listenerHandler;//
        private int maxPendingReceives;
        private int maxTransactedBatchSize;
        private MessageVersion messageVersion;
        private SynchronizedChannelCollection<IChannel> pendingChannels;
        private bool performDefaultCloseInput;
        private bool receiveContextEnabled;
        private bool receiveSynchronously;
        private bool sendAsynchronously;
        private ServiceThrottle serviceThrottle;
        private bool session;
        private SharedRuntimeState shared;
        private IDefaultCommunicationTimeouts timeouts;
        private IsolationLevel transactionIsolationLevel;
        private bool transactionIsolationLevelSet;
        private TimeSpan transactionTimeout;

    }

    ChannelHandle:

    private void HandleReceiveComplete(RequestContext context)
    {
        if ((context == null) && this.incrementedActivityCountInConstructor)
        {
            this.listener.ChannelDispatcher.Channels.DecrementActivityCount();
        }
        if (this.channel != null)
        {
            this.channel.HandleReceiveComplete(context);
        }
        else if ((context == null) && this.hasSession)
        {
            bool flag;
            lock (this.ThisLock)
            {
                flag = !this.doneReceiving;
                this.doneReceiving = true;
            }
            if (flag)
            {
                this.receiver.Close();
                if (this.idleManager != null)
                {
                    this.idleManager.CancelTimer();
                }
                ServiceThrottle throttle = this.throttle;
                if (throttle != null)
                {
                    throttle.DeactivateChannel();
                }
            }
        }
    }

  • 相关阅读:
    python九九乘法表
    js的规范写法ES5(自己以后按照这样写)
    git使用和理解之一(不含分支)
    Javascript中对象的Obeject.defineProperty()方法-------------(ES5/个人理解)
    escape()、encodeURI()、encodeURIComponent()区别详解--zt
    webpack学习(一)
    width:100%以什么为基准的测试
    git status中文文件名编码问题解决
    系统构建基础
    jdk+Tomcat环境搭建
  • 原文地址:https://www.cnblogs.com/qianyz/p/2690372.html
Copyright © 2011-2022 走看看