src/Miles.GreenPipes/TransactionContext/TransactionContextExtensions.cs
/// <summary>
/// Encapsulates the pipe behavior in a <see cref="ITransactionContext" />.
/// </summary>
/// <typeparam name="TContext">The type of the consumer.</typeparam>
/// <param name="configurator">The configurator.</param>
/// <param name="configure">The callback to configure the message pipeline</param>
/// <returns></returns>
Encapsulates the pipe behavior in a .
Encapsulates the pipe behavior in a .
public static void UseTransactionContext<TContext>(this IPipeConfigurator<TContext> configurator, Action<ITransactionContextConfigurator> configure = null) where TContext : class, PipeContext
        {
            var spec = new TransactionContextSpecification<TContext>();
            configure?.Invoke(spec);
            configurator.AddPipeSpecification(spec);
        }
public static void UseTransactionContext < TContext > ( this IPipeConfigurator < TContext > configurator , Action < ITransactionContextConfigurator > configure = null ) where TContext : class , PipeContext { var spec = new TransactionContextSpecification < TContext > ( ) ; configure ? . Invoke ( spec ) ; configurator . AddPipeSpecification ( spec ) ; }
Encapsulates the pipe behavior in a .
Encapsulates the pipe behavior in a .
None
IPipeConfigurator<TContext>
this
configure
Action<ITransactionContextConfigurator>
The callback to configure the message pipeline
The callback to configure the message pipeline
configurator
None
typeparam
The type of the consumer.
The type of the consumer .