public ConnectAsyncResult(PipeConnectionInitiator parent, Uri remoteUri, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.parent = parent; this.remoteUri = remoteUri; this.timeoutHelper = new TimeoutHelper(timeout); parent.PrepareConnect(remoteUri, this.timeoutHelper.RemainingTime(), out this.resolvedAddress, out this.backoffHelper); if (this.ConnectAndWait()) { base.Complete(true); } }
protected override string GetPoolKey(EndpointAddress address, Uri via) { string pipeName; lock (base.ThisLock) { if (!this.pipeNameCache.TryGetValue(via, out pipeName)) { pipeName = PipeConnectionInitiator.GetPipeName(via); this.pipeNameCache.Add(via, pipeName); } } return(pipeName); }
protected override string GetPoolKey(EndpointAddress address, Uri via) { string result; lock (base.ThisLock) { if (!this.pipeNameCache.TryGetValue(via, out result)) { result = PipeConnectionInitiator.GetPipeName(via, this.transportFactorySettings); this.pipeNameCache.Add(via, result); } } return(result); }
public ConnectAsyncResult(PipeConnectionInitiator parent, Uri remoteUri, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.parent = parent; this.remoteUri = remoteUri; this.timeoutHelper = new TimeoutHelper(timeout); parent.PrepareConnect(remoteUri, this.timeoutHelper.RemainingTime(), out this.resolvedAddress, out this.backoffHelper); if (this.ConnectAndWait()) { this.Complete(true); } }