34 lines
669 B
C#
34 lines
669 B
C#
using RobotApp.Interfaces;
|
|
using RobotApp.VDA5050.State;
|
|
|
|
namespace RobotApp.Services.Robot;
|
|
|
|
public class RobotInfomations : IInfomation
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
}
|