Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user