示例#1
0
        public RedisCommontHelper()
        {
            //后面用配置
            //"[email protected]:16379"
            var connection = ConfigActionCommont.CreateInstance().GetValue("RedisSetting:ReadWriteConnection");
            var split      = connection.Split("@");

            Password   = split[0].ToString();
            ServerName = split[1].ToString();
        }
示例#2
0
 public void SetExchangQueueName(string exchangName = "", string queueName = "", string exchangeType = "")
 {
     if (string.IsNullOrEmpty(exchangName))
     {
         exchangName = ConfigActionCommont.CreateInstance().GetValue("MQSetting:MQVirtualHost");
     }
     if (string.IsNullOrEmpty(queueName))
     {
         queueName = ConfigActionCommont.CreateInstance().GetValue("MQSetting:MQExchangQueue");
     }
     if (string.IsNullOrEmpty(exchangeType))
     {
         exchangeType = ConfigActionCommont.CreateInstance().GetValue("MQSetting:MQExchangType");
     }
     Producter.SetExchangQueueName(exchangName, queueName, exchangeType);
 }
示例#3
0
        public LogBuilder()
        {
            var logType = "1";

            logType = ConfigActionCommont.CreateInstance().GetValue("LogSetting:LogType");
            if (logType.ToLower() == "1")
            {
                logHelper = SerilogActionExtention.CreateInstance();
            }
            else if (logType.ToLower() == "2")
            {
                logHelper = NlogActionExtention.CreateInstance();
            }
            else if (logType.ToLower() == "3")
            {
                logHelper = ExceptionlessActionExtention.CreateInstance();
            }
        }
示例#4
0
 public void SetExchangQueueName(string exchangName = "", string queueName = "", string exchangeType = "")
 {
     if (string.IsNullOrEmpty(exchangName))
     {
         exchangName = ConfigActionCommont.CreateInstance().GetValue("MQSetting:MQVirtualHost");
     }
     if (string.IsNullOrEmpty(queueName))
     {
         queueName = ConfigActionCommont.CreateInstance().GetValue("MQSetting:MQExchangQueue");
     }
     if (string.IsNullOrEmpty(exchangeType))
     {
         exchangeType = ConfigActionCommont.CreateInstance().GetValue("MQSetting:MQExchangType");
     }
     Consumer.SetExchangQueueName(exchangName, queueName, exchangeType);
     Consumer.RabbitMQConsumerReceived += ConsumerReceived;
     Consumer.InitRabbitMQ();
 }