|
|
@@ -51,13 +51,12 @@ namespace YSAI.Tool.Core.mqtt.service
|
|
|
/// <summary>
|
|
|
/// 端口
|
|
|
/// </summary>
|
|
|
- public string Port
|
|
|
+ public int Port
|
|
|
{
|
|
|
get => GetProperty(() => Port);
|
|
|
set
|
|
|
{
|
|
|
SetProperty(() => Port, value);
|
|
|
- SetConfig(Port: value);
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
@@ -271,13 +270,13 @@ namespace YSAI.Tool.Core.mqtt.service
|
|
|
/// 设置配置
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public bool SetConfig(string IPAddress = null, string Port = null, string LoginID = null, string LoginPassword = null, string MaxNumber = null)
|
|
|
+ public bool SetConfig(string IPAddress = null, string LoginID = null, string LoginPassword = null, string MaxNumber = null)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
return SetConfig(new MqttServiceData.Basics()
|
|
|
{
|
|
|
- Port = Port.IsEmpty() ? this.Port : Port,
|
|
|
+ Port = this.Port,
|
|
|
UserName = LoginID.IsEmpty() ? this.LoginID : LoginID,
|
|
|
Password = LoginPassword.IsEmpty() ? this.LoginPassword : LoginPassword,
|
|
|
MaxNumber = MaxNumber.IsEmpty() ? this.MaxNumber.IsEmpty() ? 0 : int.Parse(this.MaxNumber) : int.Parse(MaxNumber)
|