CSV like PDSF ready to test
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user