public RedisCommontHelper() { //后面用配置 //"[email protected]:16379" var connection = ConfigActionCommont.CreateInstance().GetValue("RedisSetting:ReadWriteConnection"); var split = connection.Split("@"); Password = split[0].ToString(); ServerName = split[1].ToString(); }
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); }
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(); } }
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(); }