IW4M-Admin/SharedLibraryCore/Helpers/ChangeTracking.cs
RaidMax be68335f70 update change tracking and elo
master shows monitoring server count
master can provide individual localizations
2018-05-20 21:35:56 -05:00

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();
}
}