Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultProducerExecutionStrategy{TItem}"/> class.
 /// </summary>
 /// <param name="scopeFactory">The factory for creating service scopes.</param>
 /// <param name="producerFactory">The factory for creating producers.</param>
 /// <param name="synchronizationPolicy">The policy used to synchronize the producer and consumer engines to prevent over producing work.</param>
 /// <param name="alwaysExecuteOnDefaultValue">true to always execute the callback, even if the value produced is the default; otherwise false.</param>
 public DefaultProducerExecutionStrategy(IServiceScopeFactory scopeFactory, IProducerResolver <TItem> producerFactory, ISynchronizationPolicy synchronizationPolicy, bool alwaysExecuteOnDefaultValue)
 {
     this.scopeFactory                = scopeFactory ?? throw new ArgumentNullException(nameof(scopeFactory));
     this.producerFactory             = producerFactory ?? throw new ArgumentNullException(nameof(producerFactory));
     this.synchronizationPolicy       = synchronizationPolicy;
     this.alwaysExecuteOnDefaultValue = alwaysExecuteOnDefaultValue;
 }
 public StubDefaultProducerExecutionStrategy(IServiceScopeFactory scopeFactory, IProducerResolver <TItem> producerFactory, ISynchronizationPolicy synchronizationPolicy, bool alwaysExecuteOnDefaultValue) : base(
         scopeFactory, producerFactory, synchronizationPolicy, alwaysExecuteOnDefaultValue)
 {
 }
Exemplo n.º 3
0
 public RabbitPublisher(IProducerResolver resolver)
 {
     _resolver = resolver;
 }