Esempio n. 1
0
		/// <summary>
		///		Initializes a new instance of the <see cref="ClientTransportManager"/> class.
		/// </summary>
		/// <param name="configuration">
		///		The <see cref="RpcClientConfiguration"/> which contains various configuration information.
		/// </param>
		/// <exception cref="ArgumentNullException">
		///		<paramref name="configuration"/> is <c>null</c>.
		/// </exception>
		protected ClientTransportManager( RpcClientConfiguration configuration )
		{
			if ( configuration == null )
			{
				throw new ArgumentNullException( "configuration" );
			}

			Contract.EndContractBlock();

			this._configuration = configuration;
			this._requestContextPool = configuration.RequestContextPoolProvider( () => new ClientRequestContext( configuration ), configuration.CreateRequestContextPoolConfiguration() );
			this._responseContextPool = configuration.ResponseContextPoolProvider( () => new ClientResponseContext( configuration ), configuration.CreateResponseContextPoolConfiguration() );
		}
        /// <summary>
        ///		Initializes a new instance of the <see cref="ClientTransportManager"/> class.
        /// </summary>
        /// <param name="configuration">
        ///		The <see cref="RpcClientConfiguration"/> which contains various configuration information.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///		<paramref name="configuration"/> is <c>null</c>.
        /// </exception>
        protected ClientTransportManager(RpcClientConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            Contract.EndContractBlock();

            this._configuration       = configuration;
            this._requestContextPool  = configuration.RequestContextPoolProvider(() => new ClientRequestContext(configuration), configuration.CreateRequestContextPoolConfiguration());
            this._responseContextPool = configuration.ResponseContextPoolProvider(() => new ClientResponseContext(configuration), configuration.CreateResponseContextPoolConfiguration());
        }
Esempio n. 3
0
        /// <summary>
        ///		Initializes a new instance of the <see cref="ClientTransportManager"/> class.
        /// </summary>
        /// <param name="configuration">
        ///		The <see cref="RpcClientConfiguration"/> which contains various configuration information.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///		<paramref name="configuration"/> is <c>null</c>.
        /// </exception>
        protected ClientTransportManager(RpcClientConfiguration configuration)
        {
            Contract.EndContractBlock();

            this.configuration  = configuration ?? throw new ArgumentNullException(nameof(configuration));
            requestContextPool  = configuration.RequestContextPoolProvider(() => new ClientRequestContext(configuration), configuration.CreateRequestContextPoolConfiguration());
            responseContextPool = configuration.ResponseContextPoolProvider(() => new ClientResponseContext(configuration), configuration.CreateResponseContextPoolConfiguration());
        }