From 4497c136349cb4ca8d56ddff3c398dade37484d1 Mon Sep 17 00:00:00 2001 From: Diego <2248356998@qq.com> Date: Wed, 25 Dec 2024 10:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin | 2 +- src/Directory.Build.props | 4 ++-- .../ThingsGateway.Foundation.Variable/VariableObject.cs | 2 +- .../ThingsGateway.Foundation/Channel/ChannelData.cs | 8 ++++---- .../ThingsGateway.Foundation/Channel/Plugin/IDtu.cs | 2 +- .../ThingsGateway.Foundation/Channel/SerialPortChannel.cs | 2 +- .../ThingsGateway.Foundation/Channel/TcpClientChannel.cs | 2 +- .../Interval/BusinessBaseWithCacheIntervalAlarmModel.cs | 2 +- .../Interval/BusinessBaseWithCacheIntervalDeviceModel.cs | 6 +++--- .../BusinessBaseWithCacheIntervalVariableModel.cs | 4 ++-- .../Services/Variable/IVariableService.cs | 2 +- .../Pages/Config/Variable/VariablePage.razor.cs | 2 +- src/Version.props | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Admin b/Admin index 22af55941..273310cba 160000 --- a/Admin +++ b/Admin @@ -1 +1 @@ -Subproject commit 22af559418f6e3a7222f919801388290c07a6196 +Subproject commit 273310cba0091b692e7433ace96cae7475eb70a0 diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 721e4078e..fa077564f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,8 +1,8 @@ - 9.0.2.63 - 9.0.2.82 + 9.0.2.64 + 9.0.2.83 diff --git a/src/Foundation/ThingsGateway.Foundation.Variable/VariableObject.cs b/src/Foundation/ThingsGateway.Foundation.Variable/VariableObject.cs index ae8061e6d..dcef3965e 100644 --- a/src/Foundation/ThingsGateway.Foundation.Variable/VariableObject.cs +++ b/src/Foundation/ThingsGateway.Foundation.Variable/VariableObject.cs @@ -102,7 +102,7 @@ public abstract class VariableObject throw new ArgumentException("Can only access properties"); } // 从字典中获取与属性对应的变量信息 - if (!this.VariableRuntimePropertyDict.TryGetValue(memberExpression.Member.Name, out var variable)) + if (!VariableRuntimePropertyDict.TryGetValue(memberExpression.Member.Name, out var variable)) { throw new KeyNotFoundException($"Variable for {memberExpression.Member.Name} not found."); } diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/ChannelData.cs b/src/Foundation/ThingsGateway.Foundation/Channel/ChannelData.cs index 716fbbcb9..6f65b73de 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/ChannelData.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/ChannelData.cs @@ -116,19 +116,19 @@ public class ChannelData switch (channelData.ChannelType) { case ChannelTypeEnum.TcpClient: - channelData.Channel =await channelData.TouchSocketConfig.GetTcpClientWithIPHostAsync(channelData.RemoteUrl, channelData.BindUrl).ConfigureAwait(false); + channelData.Channel = await channelData.TouchSocketConfig.GetTcpClientWithIPHostAsync(channelData.RemoteUrl, channelData.BindUrl).ConfigureAwait(false); break; case ChannelTypeEnum.TcpService: - channelData.Channel =await channelData.TouchSocketConfig.GetTcpServiceWithBindIPHostAsync(channelData.BindUrl).ConfigureAwait(false); + channelData.Channel = await channelData.TouchSocketConfig.GetTcpServiceWithBindIPHostAsync(channelData.BindUrl).ConfigureAwait(false); break; case ChannelTypeEnum.SerialPort: - channelData.Channel =await channelData.TouchSocketConfig.GetSerialPortWithOptionAsync(channelData.Map()).ConfigureAwait(false); + channelData.Channel = await channelData.TouchSocketConfig.GetSerialPortWithOptionAsync(channelData.Map()).ConfigureAwait(false); break; case ChannelTypeEnum.UdpSession: - channelData.Channel =await channelData.TouchSocketConfig.GetUdpSessionWithIPHostAsync(channelData.RemoteUrl, channelData.BindUrl).ConfigureAwait(false); + channelData.Channel = await channelData.TouchSocketConfig.GetUdpSessionWithIPHostAsync(channelData.RemoteUrl, channelData.BindUrl).ConfigureAwait(false); break; } } diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/Plugin/IDtu.cs b/src/Foundation/ThingsGateway.Foundation/Channel/Plugin/IDtu.cs index 941494481..b705c3698 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/Plugin/IDtu.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/Plugin/IDtu.cs @@ -21,5 +21,5 @@ public interface IDtu : ITcpService /// /// 默认Dtu注册包,utf-8字符串 /// - public string DtuId { get; set; } + public string DtuId { get; set; } } diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs index bae517769..a7ebfab9e 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs @@ -118,7 +118,7 @@ public class SerialPortChannel : SerialPortClient, IClientChannel /// public override string? ToString() { - var port = this.Config?.GetValue(SerialPortConfigExtension.SerialPortOptionProperty); + var port = Config?.GetValue(SerialPortConfigExtension.SerialPortOptionProperty); if (port != null) return $"{port.PortName}[{port.BaudRate},{port.DataBits},{port.StopBits},{port.Parity}]"; return base.ToString(); diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs index e11c06db7..d6af2bc38 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs @@ -22,7 +22,7 @@ public class TcpClientChannel : TcpClient, IClientChannel { WaitHandlePool.MaxSign = ushort.MaxValue; } - public int MaxSign { get => WaitHandlePool.MaxSign; set => WaitHandlePool.MaxSign = value; } + public int MaxSign { get => WaitHandlePool.MaxSign; set => WaitHandlePool.MaxSign = value; } /// public ChannelReceivedEventHandler ChannelReceived { get; set; } = new(); diff --git a/src/Gateway/ThingsGateway.Gateway.Application/Plugin/Business/Cache/Interval/BusinessBaseWithCacheIntervalAlarmModel.cs b/src/Gateway/ThingsGateway.Gateway.Application/Plugin/Business/Cache/Interval/BusinessBaseWithCacheIntervalAlarmModel.cs index f7d637220..7cf992d6c 100644 --- a/src/Gateway/ThingsGateway.Gateway.Application/Plugin/Business/Cache/Interval/BusinessBaseWithCacheIntervalAlarmModel.cs +++ b/src/Gateway/ThingsGateway.Gateway.Application/Plugin/Business/Cache/Interval/BusinessBaseWithCacheIntervalAlarmModel.cs @@ -62,7 +62,7 @@ public abstract class BusinessBaseWithCacheIntervalAlarmModel { @@ -134,7 +134,7 @@ public abstract class BusinessBaseWithCacheIntervalDeviceModel : BusinessBa // 注册变量值变化事件处理程序 GlobalData.VariableValueChangeEvent -= VariableValueChange; - if (_businessPropertyWithCacheInterval.BusinessUpdateEnum!= BusinessUpdateEnum.Interval) + if (_businessPropertyWithCacheInterval.BusinessUpdateEnum != BusinessUpdateEnum.Interval) { GlobalData.VariableValueChangeEvent += VariableValueChange; - + } // 触发一次变量值变化事件 CurrentDevice.VariableRunTimes.ForEach(a => diff --git a/src/Gateway/ThingsGateway.Gateway.Application/Services/Variable/IVariableService.cs b/src/Gateway/ThingsGateway.Gateway.Application/Services/Variable/IVariableService.cs index 06740c0ef..d5ce28835 100644 --- a/src/Gateway/ThingsGateway.Gateway.Application/Services/Variable/IVariableService.cs +++ b/src/Gateway/ThingsGateway.Gateway.Application/Services/Variable/IVariableService.cs @@ -81,7 +81,7 @@ public interface IVariableService /// /// 创建n个modbus变量 /// - Task InsertTestDataAsync(int variableCount, int deviceCount,string slaveUrl="127.0.0.1:502"); + Task InsertTestDataAsync(int variableCount, int deviceCount, string slaveUrl = "127.0.0.1:502"); /// /// 表格查询 diff --git a/src/Gateway/ThingsGateway.Gateway.Razor/Pages/Config/Variable/VariablePage.razor.cs b/src/Gateway/ThingsGateway.Gateway.Razor/Pages/Config/Variable/VariablePage.razor.cs index 95abb86fd..9f18b756e 100644 --- a/src/Gateway/ThingsGateway.Gateway.Razor/Pages/Config/Variable/VariablePage.razor.cs +++ b/src/Gateway/ThingsGateway.Gateway.Razor/Pages/Config/Variable/VariablePage.razor.cs @@ -318,7 +318,7 @@ public partial class VariablePage : IDisposable { await Task.Run(async () => { - await VariableService.InsertTestDataAsync(TestVariableCount,TestDeviceCount, SlaveUrl); + await VariableService.InsertTestDataAsync(TestVariableCount, TestDeviceCount, SlaveUrl); await InvokeAsync(async () => { await ToastService.Default(); diff --git a/src/Version.props b/src/Version.props index b2756a44d..5b1a9db9a 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,6 +1,6 @@ - 7.2.0.93 + 7.2.0.94