底层通道设备列表更换为线程安全列表

This commit is contained in:
Kimdiego2098
2024-02-02 12:29:19 +08:00
parent b09b9752ca
commit bd04e33586
6 changed files with 6 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ public interface IChannel : IConnectObject, ICloseObject, ISetupConfigObject, ID
/// <summary>
/// 该通道下的所有设备
/// </summary>
public List<IProtocol> Collects { get; }
public ConcurrentList<IProtocol> Collects { get; }
/// <summary>
/// CanSend

View File

@@ -29,7 +29,7 @@ namespace ThingsGateway.Foundation
public EasyLock WaitLock { get; } = new EasyLock();
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <summary>
/// 接收到数据

View File

@@ -34,7 +34,7 @@ namespace ThingsGateway.Foundation
public EasyLock WaitLock { get; } = new EasyLock();
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <inheritdoc/>
protected override void Dispose(bool disposing)

View File

@@ -20,7 +20,7 @@ namespace ThingsGateway.Foundation
public class TgTcpClient : TgTcpClientBase, IClientChannel
{
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <inheritdoc/>
public EasyLock WaitLock { get; } = new EasyLock();

View File

@@ -26,7 +26,7 @@ namespace ThingsGateway.Foundation
}
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
#region

View File

@@ -56,7 +56,7 @@ namespace ThingsGateway.Foundation
DataHandlingAdapter IClientChannel.DataHandlingAdapter => DataHandlingAdapter;
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <inheritdoc/>
public void SetDataHandlingAdapter(DataHandlingAdapter adapter)