FlagDuplicates
CA1510 Complete
This commit is contained in:
@ -2,27 +2,97 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.FileHandlers.QS408M;
|
||||
|
||||
#nullable enable
|
||||
|
||||
public class Body
|
||||
{
|
||||
|
||||
public List<Site> Sites { get; set; }
|
||||
public string WaferMeanThickness { get; set; }
|
||||
public string StdDev { get; set; }
|
||||
public string PassFail { get; set; }
|
||||
public Body(List<Site> sites, string waferMeanThickness, string stdDev, string passFail)
|
||||
{
|
||||
Sites = sites;
|
||||
WaferMeanThickness = waferMeanThickness;
|
||||
StdDev = stdDev;
|
||||
PassFail = passFail;
|
||||
}
|
||||
|
||||
}
|
||||
public List<Site> Sites { get; }
|
||||
public string WaferMeanThickness { get; }
|
||||
public string StdDev { get; }
|
||||
public string PassFail { get; }
|
||||
|
||||
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
|
||||
// operator: J batch: BIORAD#2
|
||||
// cassette: wafer: 52-589368-4445
|
||||
// --------------------------------------------------------------------------------
|
||||
// position thickness position thickness position thickness
|
||||
// 1 45.735 2 46.536 3 46.742
|
||||
// 4 46.015 5 46.648 6 45.366
|
||||
// 7 46.263 8 46.512 9 46.373
|
||||
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
|
||||
// ================================================================================
|
||||
private static bool IsNullOrWhiteSpace(string text)
|
||||
{
|
||||
bool flag;
|
||||
int num = 0;
|
||||
while (true)
|
||||
{
|
||||
if (num >= text.Length)
|
||||
{
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
else if (char.IsWhiteSpace(text[num]))
|
||||
{
|
||||
num++;
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Radial variation (computation B) PASS:
|
||||
private static string GetToken(string text, int[] i)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (i[0] >= text.Length || !IsNullOrWhiteSpace(text.Substring(i[0], 1)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
i[0]++;
|
||||
}
|
||||
int num = i[0];
|
||||
while (true)
|
||||
{
|
||||
if (num >= text.Length || IsNullOrWhiteSpace(text.Substring(num, 1)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
string str = text.Substring(i[0], num - i[0]);
|
||||
i[0] = num;
|
||||
return str.Trim();
|
||||
}
|
||||
|
||||
// thickness -2.7474
|
||||
internal static Body? Get(string text, int[] i)
|
||||
{
|
||||
Body? result;
|
||||
Site site;
|
||||
string thickness;
|
||||
List<Site> sites = new();
|
||||
string position = GetToken(text, i);
|
||||
while (true)
|
||||
{
|
||||
if (string.IsNullOrEmpty(position) || !char.IsDigit(position[0]))
|
||||
break;
|
||||
thickness = GetToken(text, i);
|
||||
site = new(position, thickness);
|
||||
sites.Add(site);
|
||||
position = GetToken(text, i);
|
||||
}
|
||||
i[0] = Complete.ScanPast(text, i, "mean thickness =");
|
||||
string meanThickness = Complete.GetBefore(text, i, ", std. dev =");
|
||||
string stdDev = GetToken(text, i);
|
||||
string passFail = Complete.GetToEOL(text, i);
|
||||
result = new(sites,
|
||||
meanThickness,
|
||||
stdDev,
|
||||
passFail);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user