예제 #1
0
 // Copy Constructor
 private void CopyFrom(CONNECTIONOBJECTNAME connection) { // V1.2.3300
     ADP.CheckArgumentNull(connection, "connection");
     _userConnectionOptions = connection.UserConnectionOptions;
     _poolGroup = connection.PoolGroup;
     
     // SQLBU 432115
     //  Match the original connection's behavior for whether the connection was never opened,
     //  but ensure Clone is in the closed state.
     if (DbConnectionClosedNeverOpened.SingletonInstance == connection._innerConnection)
     {
         _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance;
     }
     else
     {
         _innerConnection = DbConnectionClosedPreviouslyOpened.SingletonInstance;
     }
 }
예제 #2
0
        // Copy Constructor
        private void CopyFrom(CONNECTIONOBJECTNAME connection)   // V1.2.3300
        {
            ADP.CheckArgumentNull(connection, "connection");
            _userConnectionOptions = connection.UserConnectionOptions;
            _poolGroup             = connection.PoolGroup;

            // SQLBU 432115
            //  Match the original connection's behavior for whether the connection was never opened,
            //  but ensure Clone is in the closed state.
            if (DbConnectionClosedNeverOpened.SingletonInstance == connection._innerConnection)
            {
                _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance;
            }
            else
            {
                _innerConnection = DbConnectionClosedPreviouslyOpened.SingletonInstance;
            }
        }