internal SoapSqlInputChannel( EndpointReference endpoint, string unformatedConnectionString )
     : base(endpoint)
 {
     _endpoint = endpoint;
     _unformatedConnectionString = unformatedConnectionString;
     _reader = SqlMessageReader.GetReaderForServer( endpoint.TransportAddress.Host, unformatedConnectionString );
 }
        public static SqlMessageReader GetReaderForServer( string server, string unformatedConnectionString )
        {
            lock ( _endpointReaders )
            {
                SqlMessageReader reader = _endpointReaders[ server ] as SqlMessageReader;

                if ( reader == null )
                {
                    reader = new SqlMessageReader( server, unformatedConnectionString );

                    _endpointReaders[ server ] = reader;
                }

                return reader;
            }
        }