Ejemplo n.º 1
0
 internal SoapSqlInputChannel( EndpointReference endpoint, string unformatedConnectionString )
     : base(endpoint)
 {
     _endpoint = endpoint;
     _unformatedConnectionString = unformatedConnectionString;
     _reader = SqlMessageReader.GetReaderForServer( endpoint.TransportAddress.Host, unformatedConnectionString );
 }
Ejemplo n.º 2
0
        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;
            }
        }