System.Data.SqlClient.SqlClientDiagnosticListenerExtensions.WriteTransactionRollbackError C# (CSharp) Method

WriteTransactionRollbackError() public static method

public static WriteTransactionRollbackError ( this @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, string transactionName, Exception ex, [ operation = "" ) : void
@this this
operationId Guid
isolationLevel IsolationLevel
connection SqlConnection
transactionName string
ex Exception
operation [
return void
        public static void WriteTransactionRollbackError(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, string transactionName, Exception ex, [CallerMemberName] string operation = "")
        {
            if (@this.IsEnabled(SqlErrorRollbackTransaction))
            {
                @this.Write(
                    SqlErrorRollbackTransaction,
                    new
                    {
                        OperationId = operationId,
                        Operation = operation,
                        IsolationLevel = isolationLevel,
                        Connection = connection,
                        TransactionName = transactionName,
                        Exception = ex,
                        Timestamp = Stopwatch.GetTimestamp()
                    });
            }
        }
    }