C# Class Rebus.Transport.AmbientTransactionContext

Provides an "ambient" context for stashing away an instance that implements the current ITransactionContext. The ambient transaction context is automatically preserved even though threads are changed etc.
Afficher le fichier Open project: rebus-org/Rebus Class Usage Examples

Méthodes publiques

Свойство Type Description
DefaultGetter Func
DefaultSetter Action

Méthodes publiques

Méthode Description
SetAccessors ( Action setter, Func getter ) : void

Sets the accessor functions used by Rebus to set the current transaction when executing handlers and getting the context by picking it up when sending messages

SetCurrent ( ITransactionContext transactionContext ) : void

Sets the current transaction context. Please note that in most cases, it is not necessary to set the context using this method - when using DefaultTransactionContextScope and DefaultSyncTransactionContextScope the ambient transaction context is automatically set/unset when the object is created/disposed.

Method Details

SetAccessors() public static méthode

Sets the accessor functions used by Rebus to set the current transaction when executing handlers and getting the context by picking it up when sending messages
public static SetAccessors ( Action setter, Func getter ) : void
setter Action
getter Func
Résultat void

SetCurrent() public static méthode

Sets the current transaction context. Please note that in most cases, it is not necessary to set the context using this method - when using DefaultTransactionContextScope and DefaultSyncTransactionContextScope the ambient transaction context is automatically set/unset when the object is created/disposed.
public static SetCurrent ( ITransactionContext transactionContext ) : void
transactionContext ITransactionContext
Résultat void

Property Details

DefaultGetter public_oe static_oe property

Gets the default set function (which is using CallContext.LogicalGetData to do its thing)
public static Func DefaultGetter
Résultat Func

DefaultSetter public_oe static_oe property

Gets the default set function (which is using CallContext.LogicalSetData to do its thing)
public static Action DefaultSetter
Résultat Action