コード例 #1
0
 /// <summary>
 /// 实例化一个新消息消费者
 /// </summary>
 /// <param name="service">消息队列服务</param>
 /// <param name="chanels">消息队列管道</param>
 public RedisMqConsumer(RedisQueueService service, string chanels)
 {
     Contract.Requires <ArgumentException>(!string.IsNullOrEmpty(chanels));
     Contract.Requires <ArgumentNullException>(service != null);
     {
         service.Subscribe <T>(chanels, Handle);
         service.Start();
     }
 }
コード例 #2
0
 /// <summary>
 /// 实例化一个新消息消费者
 /// </summary>
 /// <param name="service">消息队列服务</param>
 /// <param name="chanels">消息队列管道</param>
 public RedisMqPublisher(RedisQueueService service, string chanels)
 {
     Contract.Requires <ArgumentException>(!string.IsNullOrEmpty(chanels));
     Contract.Requires <ArgumentNullException>(service != null);
     {
         m_chanels = chanels;
         m_service = service;
         service.Start();
     }
 }