MeiRiYiCheng_2_new/netcore/YB.DeviceV2/YB.DeviceV2.EventBus/CapSetting.cs

29 lines
940 B
C#

namespace YB.DeviceV2.EventBus
{
/// <summary>
/// cap设置
/// </summary>
public class CapSetting
{
/// <summary>
/// 设置默认配置
/// </summary>
/// <param name="options"></param>
/// <returns></returns>
internal static EventBusSettingsOptions SetDefaultSettings(EventBusSettingsOptions options)
{
options.Enabled ??= true;
if (options.Enabled == true)
{
options.GroupName ??= "yb.devicev2.queue";
options.HostName ??= "localhost";
options.Port ??= 5672;
options.UserName ??= "liuzl";
options.Password ??= "liuzl";
options.DBConnection ??= "server=localhost,4331;database=capsavedb;uid=fans_user;pwd=fans1qaz@WSX;";
options.ExpirtTime ??= 3600;
}
return options;
}
}
}