using MultiTerm.Core.Types; namespace MultiTerm.Core.Model; public class MultiFormatString { public List> FormatValuePairs { get; private set; } = new(); public void Add(FormatType format, string value) { // TODO check if value is valid this.FormatValuePairs.Add(Tuple.Create(format, value)); } public void Remove(int amount) { // guard amount <= 0 if (amount <= 0) throw new ArgumentException($"{nameof(amount)} cannot be <= 0"); // limit amount to maximum int listCount = this.FormatValuePairs.Count; if (amount > listCount) { amount = listCount; } // remove range this.FormatValuePairs.RemoveRange( (listCount - amount) , amount); } public override string ToString() { throw new NotImplementedException(); } }