Skip to content

TransactionalStatusExtensions Methods

Provides operations for interpreting transaction statuses.

ConvertToUserException(TransactionalStatus, string, Exception?)

staticextension
View source
public static OrleansTransactionException ConvertToUserException(this TransactionalStatus status, string transactionId, Exception? exception)
Creates the user-facing transaction exception represented by a failure status.

Parameters

statusTransactionalStatus
The transaction failure status.
transactionIdstring
The transaction identifier.
exceptionException?
The exception which contributed to the failure, if available.

Returns

An exception describing the transaction outcome.

DefinitelyAborted(TransactionalStatus)

staticextension
View source
public static bool DefinitelyAborted(this TransactionalStatus status)
Determines whether a status guarantees that the transaction aborted.

Parameters

statusTransactionalStatus
The transaction status.

Returns

true if the transaction is known to have aborted; otherwise, false.