27 lines
599 B
C#
27 lines
599 B
C#
using Microsoft.Extensions.Configuration;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Nirvana.Common.RabbitMQ
|
|
{
|
|
/// <summary>
|
|
/// 连接字符串类
|
|
/// </summary>
|
|
public class RabbitOption
|
|
{
|
|
public RabbitOption(IConfiguration config)
|
|
{
|
|
if (config == null)
|
|
throw new ArgumentException(nameof(config));
|
|
|
|
var section = config.GetSection("rabbit");
|
|
section.Bind(this);
|
|
}
|
|
|
|
public string Uri { get; set; }
|
|
}
|
|
}
|