public DiscoveryClientDuplexChannel(
     ChannelManagerBase channelManagerBase,
     IChannelFactory <TChannel> innerChannelFactory,
     FindCriteria findCriteria,
     DiscoveryEndpointProvider discoveryEndpointProvider)
     : base(channelManagerBase, innerChannelFactory, findCriteria, discoveryEndpointProvider)
 {
 }
 public DiscoveryClientRequestSessionChannel(
     ChannelManagerBase channelManagerBase,
     IChannelFactory <IRequestSessionChannel> innerChannelFactory,
     FindCriteria findCriteria,
     DiscoveryEndpointProvider discoveryEndpointProvider)
     : base(channelManagerBase, innerChannelFactory, findCriteria, discoveryEndpointProvider)
 {
 }
示例#3
0
		public DiscoveryProxyCache(DiscoveryEndpointProvider inner)
		{
			if (inner == null)
				throw new ArgumentNullException("inner");

			this.inner = inner;

			AbstractChannelBuilder.DiscoveryEndpointFaulted += DiscoveryEndpointFaulted;
		}
        public DiscoveryClientChannelFactory(IChannelFactory <TChannel> innerChannelFactory, FindCriteria findCriteria, DiscoveryEndpointProvider discoveryEndpointProvider)
        {
            Fx.Assert(findCriteria != null, "The findCriteria must be non null.");
            Fx.Assert(discoveryEndpointProvider != null, "The discoveryEndpointProvider must be non null.");
            Fx.Assert(innerChannelFactory != null, "The innerChannelFactory must be non null.");

            this.findCriteria = findCriteria;
            this.discoveryEndpointProvider = discoveryEndpointProvider;
            this.innerChannelFactory       = innerChannelFactory;
        }
示例#5
0
        public DynamicEndpoint(ContractDescription contract, Binding binding)
            : base(contract, CreateBinding(binding), new EndpointAddress("http://schemas.microsoft.com/discovery/dynamic"))
        {
            if (binding == null)
            {
                throw new ArgumentNullException("binding");
            }
            DiscoveryEndpointProvider = DiscoveryEndpointProvider.CreateDefault();
            FindCriteria = new FindCriteria(contract.ContractType);

            IsSystemEndpoint = true;
        }
示例#6
0
        public DiscoveryClientBindingElement(DiscoveryEndpointProvider discoveryEndpointProvider, FindCriteria findCriteria)
        {
            if (discoveryEndpointProvider == null)
            {
                throw new ArgumentNullException("discoveryEndpointProvider");
            }
            if (findCriteria == null)
            {
                throw new ArgumentNullException("findCriteria");
            }

            DiscoveryEndpointProvider = discoveryEndpointProvider;
            FindCriteria = findCriteria;
        }
示例#7
0
        public DiscoveryClientBindingElement(DiscoveryEndpointProvider discoveryEndpointProvider, FindCriteria findCriteria)
        {
            if (discoveryEndpointProvider == null)
            {
                throw FxTrace.Exception.ArgumentNull("discoveryEndpointProvider");
            }

            if (findCriteria == null)
            {
                throw FxTrace.Exception.ArgumentNull("findCriteria");
            }

            this.findCriteria = findCriteria;
            this.discoveryEndpointProvider = discoveryEndpointProvider;
        }
        public DiscoveryClientChannelBase(
            ChannelManagerBase channelManagerBase,
            IChannelFactory <TChannel> innerChannelFactory,
            FindCriteria findCriteria,
            DiscoveryEndpointProvider discoveryEndpointProvider)
            : base(channelManagerBase)
        {
            Fx.Assert(findCriteria != null, "The findCriteria must be non null.");
            Fx.Assert(discoveryEndpointProvider != null, "The discoveryEndpointProvider must be non null.");
            Fx.Assert(innerChannelFactory != null, "The innerChannelFactory must be non null.");

            this.innerChannelFactory       = innerChannelFactory;
            this.findCriteria              = findCriteria;
            this.discoveryEndpointProvider = discoveryEndpointProvider;

            this.discoveredEndpoints      = new InputQueue <EndpointDiscoveryMetadata>();
            this.totalExpectedEndpoints   = int.MaxValue;
            this.totalDiscoveredEndpoints = 0;
            this.discoveryCompleted       = false;
            this.thisLock = new object();
        }
        void Cleanup(TimeSpan timeout)
        {
            TimeoutHelper timeoutHelper = new TimeoutHelper(timeout);
            Exception     exception     = null;

            lock (this.thisLock)
            {
                this.discoveryCompleted = true;
            }

            try
            {
                this.discoveryClient.CancelAsync(this);
                ((ICommunicationObject)this.discoveryClient).Close(timeoutHelper.RemainingTime());
            }
            catch (TimeoutException timeoutException)
            {
                exception = timeoutException;
            }
            catch (CommunicationException communicationException)
            {
                exception = communicationException;
            }
            finally
            {
                if (exception != null && TD.DiscoveryClientInClientChannelFailedToCloseIsEnabled())
                {
                    TD.DiscoveryClientInClientChannelFailedToClose(exception);
                }
            }

            this.discoveredEndpoints.Dispose();

            this.discoveryClient           = null;
            this.discoveredEndpoints       = null;
            this.findCriteria              = null;
            this.discoveryEndpointProvider = null;
            this.innerChannelFactory       = null;
        }
示例#10
0
 public DiscoveryClientBindingElement()
 {
     DiscoveryEndpointProvider = DiscoveryEndpointProvider.CreateDefault();
     FindCriteria = new FindCriteria();              // empty
 }
示例#11
0
 private DiscoveryClientBindingElement(DiscoveryClientBindingElement elementToBeCloned)
     : base(elementToBeCloned)
 {
     this.discoveryEndpointProvider = elementToBeCloned.DiscoveryEndpointProvider;
     this.findCriteria = elementToBeCloned.FindCriteria.Clone();;
 }