CSV like PDSF ready to test

This commit is contained in:
2025-01-13 12:46:35 -07:00
parent 865357bbc8
commit bc6810cf4f
15 changed files with 379 additions and 231 deletions

View File

@ -1,3 +1,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Adaptation.FileHandlers.QS408M;
public class Site
@ -12,4 +15,22 @@ public class Site
public string Position { get; }
public string Thickness { get; }
internal static ReadOnlyCollection<Site> Get(string text, int[] i)
{
List<Site> 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();
}
}