System.Data.SqlClient.TdsParser.RollbackOrphanedAPITransactions C# (CSharp) Method

RollbackOrphanedAPITransactions() private method

private RollbackOrphanedAPITransactions ( ) : void
return void
        internal void RollbackOrphanedAPITransactions()
        {
            // Any active, non-distributed transaction must be rolled back.
            SqlInternalTransaction currentTransaction = CurrentTransaction;

            if (null != currentTransaction && currentTransaction.HasParentTransaction && currentTransaction.IsOrphaned)
            {
                currentTransaction.CloseFromConnection();
                Debug.Assert(null == CurrentTransaction, "rollback didn't clear current transaction?");
            }
        }
TdsParser