Пример #1
0
 public AmqpMessageBuilder(
     IAmqpSerializerFactory serializerFactory,
     IAmqpPropertyBuilder propertyBuilder,
     IAmqpRouter router)
 {
     this.serializerFactory = serializerFactory;
     this.propertyBuilder   = propertyBuilder;
     this.router            = router;
 }
Пример #2
0
 public AmqpSubscriptionBuilder()
 {
     this.Serializers = new Dictionary <string, IAmqpSerializer>
     {
         { "plain/text", new SimpleSerializer() }
     };
     this.ConnectionFactory = new AsyncAmqpConnectionFactory(new Uri("amqp://"));
     this.router            = new AmqpRouter();
     this.propertyBuilder   = new AmqpPropertyBuilder();
     this.subscriptions     = new List <Func <IAmqpConnectionFactory, IAmqpMessageBuilder, ISubscriptionRegistry, ISubscriptionTag> >();
 }
Пример #3
0
 public AsyncAmqpBasicConsumer(
     IAmqpConnectionFactory connectionFactory,
     IAmqpPropertyBuilder amqpPropertyBuilder,
     IAmqpMessageBuilder amqpMessageBuilder,
     bool continueOnCapturedContext,
     string queue)
 {
     this.connectionFactory         = connectionFactory;
     this.amqpPropertyBuilder       = amqpPropertyBuilder;
     this.amqpMessageBuilder        = amqpMessageBuilder;
     this.continueOnCapturedContext = continueOnCapturedContext;
     this.queue = queue;
 }
Пример #4
0
 public AsyncAmqpBasicConsumer(
     IAmqpConnectionFactory connectionFactory,
     IAmqpPropertyBuilder amqpPropertyBuilder,
     IAmqpMessageBuilder amqpMessageBuilder,
     bool continueOnCapturedContext,
     string queue,
     ILogServiceProvider logServiceProvder = null)
 {
     this.connectionFactory         = connectionFactory;
     this.amqpPropertyBuilder       = amqpPropertyBuilder;
     this.amqpMessageBuilder        = amqpMessageBuilder;
     this.continueOnCapturedContext = continueOnCapturedContext;
     this.queue             = queue;
     this.logServiceProvder = logServiceProvder ?? new NullLogServiceProvider();
     this.logService        = this.logServiceProvder.GetLogServiceOf(typeof(AsyncAmqpBasicConsumer <T>));
 }