using System; using System.Collections.Generic; namespace LibSearchBox { public class DocumentMeta { public string Title { get; set; } public List Tags { get; private set; } = new List(); public DocumentMeta(string inTitle, IEnumerable inTags) { Title = inTitle; if (inTags != null) Tags.AddRange(inTags); } public void ReplaceTags(IEnumerable newTags) { Tags.Clear(); Tags.AddRange(newTags); } #region Overrides public override string ToString() { return $"[DocumentMeta Title={Title}, Tags={string.Join(",", Tags)}]"; } #endregion } }