コード例 #1
0
ファイル: MainService.cs プロジェクト: linys2333/Lys.RabbitMQ
 public MainService(IServiceProvider serviceProvider, RabbitMQSetting rabbitMQSetting, ILogger logger)
 {
     m_ServiceProvider   = serviceProvider;
     m_RabbitMQSetting   = rabbitMQSetting;
     m_Logger            = logger;
     m_CancellationToken = new CancellationTokenSource();
 }
コード例 #2
0
        private static bool IsStop(RabbitMQSetting setting, string queueName)
        {
            if (setting == null ||
                setting.StopQueues == null ||
                setting.StopQueues.Length == 0)
            {
                return(false);
            }

            if (setting.StopQueues.Contains(queueName))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
 public static ConfigurationSetting SetRabbitMQSetting(this ConfigurationSetting configurationSetting, RabbitMQSetting rabbitMQSetting)
 {
     _setting = rabbitMQSetting;
     return(configurationSetting);
 }
コード例 #4
0
 public RabbitMessagePublisher()
 {
     _publishDic      = new Dictionary <string, RabbitPublishMessageMetadata>();
     _rabbitMQSetting = ObjectContainer.Resolve <Configuration>().Setting.GetRabbitMQSetting();
 }