public static Guid WriteTransactionCommitBefore(this DiagnosticListener @this, IsolationLevel isolationLevel, SqlConnection connection, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlBeforeCommitTransaction))
{
Guid operationId = Guid.NewGuid();
@this.Write(
SqlBeforeCommitTransaction,
new
{
OperationId = operationId,
Operation = operation,
IsolationLevel = isolationLevel,
Connection = connection,
Timestamp = Stopwatch.GetTimestamp()
});
return operationId;
}
else
return Guid.Empty;
}