using System.Collections.Generic; using System.Collections.ObjectModel; namespace Adaptation.FileHandlers.QS408M; public class Site { public Site(string position, string thickness) { Position = position; Thickness = thickness; } public string Position { get; } public string Thickness { get; } internal static ReadOnlyCollection Get(string text, int[] i) { List results = new(); Site site; string thickness; string position = Body.GetToken(text, i); while (true) { if (string.IsNullOrEmpty(position) || !char.IsDigit(position[0])) break; thickness = Body.GetToken(text, i); site = new(position, thickness); results.Add(site); position = Body.GetToken(text, i); } return results.AsReadOnly(); } }