be68335f70
master shows monitoring server count master can provide individual localizations
32 lines
692 B
C#
32 lines
692 B
C#
using SharedLibraryCore.Interfaces;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace SharedLibraryCore.Helpers
|
|
{
|
|
public class ChangeTracking
|
|
{
|
|
List<string> Values;
|
|
|
|
public ChangeTracking()
|
|
{
|
|
Values = new List<string>();
|
|
}
|
|
|
|
public void OnChange(ITrackable value)
|
|
{
|
|
if (Values.Count > 30)
|
|
Values.RemoveAt(0);
|
|
Values.Add($"{DateTime.Now.ToString("HH:mm:ss.fff")} {value.GetTrackableValue()}");
|
|
}
|
|
|
|
public void ClearChanges()
|
|
{
|
|
Values.Clear();
|
|
}
|
|
|
|
public string[] GetChanges() => Values.ToArray();
|
|
}
|
|
}
|