SRP, nuget server name, _Details from details, WMO and

Static bump
This commit is contained in:
2023-05-17 13:20:43 -07:00
parent 1d4c45210d
commit cc900bea27
11 changed files with 79 additions and 30 deletions

View File

@ -109,7 +109,9 @@ public class FileRead : Shared.FileRead, IFileRead
if (iProcessData is not ProcessData processData)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string mid;
if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
if (!string.IsNullOrEmpty(processData.Run) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Run;
else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else
{

View File

@ -161,7 +161,7 @@ public class ProcessData : IProcessData
string defaultLayer = string.Empty;
string defaultReactor = string.Empty;
string defaultEmployee = string.Empty;
if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{4}$"))
if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{2,4}$"))
{
run = text.ToUpper();
psn = defaultPSN;

View File

@ -109,7 +109,9 @@ public class FileRead : Shared.FileRead, IFileRead
if (iProcessData is not ProcessData processData)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string mid;
if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
if (!string.IsNullOrEmpty(processData.Run) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Run;
else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else
{

View File

@ -318,7 +318,7 @@ public class ProcessData : IProcessData
string defaultLayer = string.Empty;
string defaultReactor = string.Empty;
string defaultEmployee = string.Empty;
if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{4}$"))
if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{2,4}$"))
{
run = text.ToUpper();
title = text;
@ -491,6 +491,7 @@ public class ProcessData : IProcessData
Detail detail;
_I = 0;
_Data = receivedData;
List<Detail> details = new();
Set(logistics, receivedData);
ScanPast("AutoOptimizeGain =");
AutoOptimizeGain = GetBefore("AutoProbeHeightSet =");
@ -513,9 +514,9 @@ public class ProcessData : IProcessData
detail.T = GetToken();
detail.Rs = GetToken();
detail.Merit = GetToken();
detail.UniqueId = string.Concat("_Point-", _Details.Count + 1);
detail.UniqueId = string.Concat("_Point-", details.Count + 1);
_ = GetToEOL();
_Details.Add(detail);
details.Add(detail);
}
else
{
@ -556,16 +557,17 @@ public class ProcessData : IProcessData
detail.Pt = num1.ToString();
detail.Rs = i;
detail.Merit = GetToken().Replace("|", "");
detail.UniqueId = string.Concat("_Point-", _Details.Count + 1);
_Details.Add(detail);
detail.UniqueId = string.Concat("_Point-", details.Count + 1);
details.Add(detail);
}
}
}
foreach (Detail item in _Details.Cast<Detail>())
foreach (Detail item in details)
{
item.HeaderUniqueId = UniqueId;
item.UniqueId = string.Concat(item, item.UniqueId);
}
_Details.AddRange(details);
fileInfoCollection.Add(logistics.FileInfo);
}