Table of Contents

Class SqlInboxTransactionScopeExtensions

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Extensions for obtaining the relational BCL transaction handle from an opaque IInboxTransactionScope handed to an inbox handler by a relational scoped transactional store (SqlServer, Postgres).

public static class SqlInboxTransactionScopeExtensions
Inheritance
SqlInboxTransactionScopeExtensions
Inherited Members

Methods

AsSqlTransaction(IInboxTransactionScope)

Obtains the active BCL IDbTransaction from the opaque inbox transaction scope, so a handler can enlist its own writes atomically with the processed-mark.

public static IDbTransaction AsSqlTransaction(this IInboxTransactionScope scope)

Parameters

scope IInboxTransactionScope

The opaque scope handed to the handler by a relational scoped transactional store.

Returns

IDbTransaction

The active local database transaction the handler's writes should enlist in.

Exceptions

ArgumentNullException

Thrown when scope is null.

InvalidOperationException

Thrown when scope did not originate from a relational inbox store (a wrong-provider scope, for example a MongoDB or Cosmos DB scope). This fails loud rather than returning null or an obscure cast failure, surfacing a provider mismatch immediately.