コード例 #1
0
        public MakeConnectionRequestContext(MakeConnectionDispatcherManager dispatcherManager, RequestContext innerContext, TimeSpan pollTimeout, IDefaultCommunicationTimeouts timeouts)
        {
            this.innerContext = innerContext;
            this.pollTimeout  = pollTimeout;
            this.timeouts     = timeouts;
            this.thisLock     = new object();

            if (this.RequestMessage != null)
            {
                this.IsMakeConnectionPollingMessage = (this.RequestMessage.Headers.Action == MakeConnectionConstants.MakeConnectionMessage.Action);
                this.RequestMesssageId = this.RequestMessage.Headers.MessageId;

                EndpointAddress address = GetAddress();

                if (address != null && this.addressIsAnonymousUri)
                {
                    this.dispatcher = dispatcherManager.Get(address.Uri);
                    if (this.RequestMesssageId != null)
                    {
                        this.dispatcher.AddContext(this);
                    }
                }
            }
        }
コード例 #2
0
        public MakeConnectionRequestContext(MakeConnectionDispatcherManager dispatcherManager, RequestContext innerContext, TimeSpan pollTimeout, IDefaultCommunicationTimeouts timeouts)
        {
            this.innerContext = innerContext;
            this.pollTimeout = pollTimeout;
            this.timeouts = timeouts;
            this.thisLock = new object();

            if (this.RequestMessage != null)
            {
                this.IsMakeConnectionPollingMessage = (this.RequestMessage.Headers.Action == MakeConnectionConstants.MakeConnectionMessage.Action);
                this.RequestMesssageId = this.RequestMessage.Headers.MessageId;

                EndpointAddress address = GetAddress();

                if (address != null && this.addressIsAnonymousUri)
                {
                    this.dispatcher = dispatcherManager.Get(address.Uri);
                    if (this.RequestMesssageId != null)
                    {
                        this.dispatcher.AddContext(this);
                    }
                }
            }
        }