src/Miles.MassTransit/Courier/ReceiveCompensateActivityHostExtensions.cs
/// <summary>
/// Creates a receive endpoint and configures an activity specifying queues by convention.
/// </summary>
/// <typeparam name="TActivity">The activity processor.</typeparam>
/// <typeparam name="TLog">The compensation log type.</typeparam>
/// <param name="configurator">The configurator.</param>
/// <param name="factory">The factory.</param>
/// <param name="configure">The configure.</param>
Creates a receive endpoint and configures an activity specifying queues by convention.
Creates a receive endpoint and configures an activity specifying queues by convention .
public static void CompensateActivityHost<TActivity, TLog>(this IBusFactoryConfigurator configurator, CompensateActivityFactory<TActivity, TLog> factory, Action<IReceiveCompensateActivityHostConfigurator<TActivity, TLog>> configure = null)
            where TActivity : class, CompensateActivity<TLog>
            where TLog : class
        {
            configure = configure ?? (r => r.Activity());
            configurator.ReceiveEndpoint(
                typeof(TLog).GenerateCompensationQueueName(),
                r => configure?.Invoke(new ReceiveCompensateActivityHostConfigurator<TActivity, TLog>(r, (c, ac) => c.CompensateActivityHost<TActivity, TLog>(factory, ac))));
        }
public static void CompensateActivityHost < TActivity , TLog > ( this IBusFactoryConfigurator configurator , CompensateActivityFactory < TActivity , TLog > factory , Action < IReceiveCompensateActivityHostConfigurator < TActivity , TLog > > configure = null ) where TActivity : class , CompensateActivity < TLog > where TLog : class { configure = configure ?? ( r => r . Activity ( ) ) ; configurator . ReceiveEndpoint ( typeof ( TLog ) . GenerateCompensationQueueName ( ) , r => configure ? . Invoke ( new ReceiveCompensateActivityHostConfigurator < TActivity , TLog > ( r , ( c , ac ) => c . CompensateActivityHost < TActivity , TLog > ( factory , ac ) ) ) ) ; }
Creates a receive endpoint and configures an activity specifying queues by convention.
Creates a receive endpoint and configures an activity specifying queues by convention .
IBusFactoryConfigurator
this
factory
CompensateActivityFactory<TActivity, TLog>
None
configure
Action<IReceiveCompensateActivityHostConfigurator<TActivity, TLog>>
None
configurator
None
typeparam
The activity processor.
The activity processor .
typeparam
The compensation log type.
The compensation log type .