using SharedLibraryCore.Interfaces; using System; using System.Collections.Generic; using System.Text; namespace SharedLibraryCore.Helpers { public class ChangeTracking { List Values; public ChangeTracking() { Values = new List(); } public void OnChange(ITrackable value) { Values.Add(value.GetTrackableValue()); } public void ClearChanges() { Values.Clear(); } public string[] GetChanges() { List values = new List(); int number = 1; foreach (string change in Values) { values.Add($"{number} {change}"); number++; } return values.ToArray(); } } }