Пример #1
0
        /// <summary>
        /// Gets a channel factory wrapper for the cached channel factory.
        /// </summary>
        /// <returns>A channel factory wrapper for the cached channel factory.</returns>
        public ChannelFactoryWrapper <TChannel> GetChannelFactory()
        {
            CheckNotDisposed();

            var wrapper = new ChannelFactoryWrapper <TChannel>(_descriptor, _channelFactory);

            _refCount++;
            return(wrapper);
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the ServiceClient class using the given endpoint configuration name.
 /// </summary>
 /// <param name="endpointConfigurationName">The name of the endpoint configuration to be used to connect.</param>
 public ServiceClient(string endpointConfigurationName)
 {
     _channelFactoryWrapper = new ChannelFactoryWrapper <T>(endpointConfigurationName, new ChannelFactory <T>(endpointConfigurationName));
 }