Files
Denso/srcs/RobotNet10/RobotApp/RobotNet10.RobotApp/Services/Robot/RobotInfomations.cs
2026-07-03 16:31:37 +07:00

35 lines
785 B
C#

using RobotNet.VDA5050.State;
using RobotNet10.RobotApp.Interfaces;
namespace RobotNet10.RobotApp.Services.Robot;
public class RobotInfomations() : IInfomation
{
public Information[] InformationState => [.. Infors];
private readonly List<Information> Infors = [];
public void AddInfo(Information infor)
{
if (Infors.Any(e => e.InfoType == infor.InfoType)) return;
lock (Infors)
{
Infors.Add(infor);
}
}
public void DeleteInfoType(string infoType)
{
lock (Infors)
{
Infors.RemoveAll(e => e.InfoType == infoType);
}
}
public void ClearAllInfos()
{
lock (Infors)
{
Infors.Clear();
}
}
}