コード例 #1
0
        public static void Send(this CoreAMQPModule module, string exchange, string queueName, string routingKey, byte[] data, string AMQPType = "RabbitMQ")
        {
            RabbitModule rabbitModule = (RabbitModule)module[AMQPType];

            if (rabbitModule == null)
            {
                throw new NullReferenceException();
            }
            rabbitModule.Send(exchange, queueName, routingKey, data);
        }
コード例 #2
0
        public static void Receive(this CoreAMQPModule module, string AMQPType, string queueName, Func <EventingBasicConsumer, EventingBasicConsumer> func)
        {
            RabbitModule rabbitMdodule = (RabbitModule)module[AMQPType];

            if (rabbitMdodule == null)
            {
                throw new NullReferenceException();
            }
            rabbitMdodule.Receive(queueName, func);
        }