Save Copy - sql or json

CA1862 and GetWeekOfYear for WritePDSF
Removed Open Insight API IFX Directory from Save
v2_52_0-Tests
net8.0
This commit is contained in:
2024-02-01 14:34:59 -07:00
parent 839a08eda7
commit ee7be147e0
75 changed files with 1633 additions and 292 deletions

View File

@ -270,7 +270,7 @@ public class Description : IDescription, Shared.Properties.IDescription
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
{
List<IDescription> results = new();
if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData)
if (iProcessData is null || iProcessData.Details.Count == 0 || iProcessData is not ProcessData processData)
results.Add(GetDefault(fileRead, logistics));
else
{

View File

@ -5,7 +5,6 @@ using Adaptation.Shared.Methods;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Text.RegularExpressions;
@ -124,7 +123,7 @@ public class FileRead : Shared.FileRead, IFileRead
}
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
if (!iProcessData.Details.Any())
if (iProcessData.Details.Count == 0)
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
results = iProcessData.GetResults(this, _Logistics, results.Item4);
}

View File

@ -616,7 +616,7 @@ public class ProcessData : IProcessData
sourceFiles.Add(sourceFileNamePdf);
string sourceFileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
string[] txtFiles = Directory.GetFiles(sourcePath, $"{sourceFileNameWithoutExtension}_*.txt", SearchOption.TopDirectoryOnly);
if (txtFiles.Any())
if (txtFiles.Length != 0)
{
foreach (string txtFile in txtFiles)
{
@ -628,7 +628,7 @@ public class ProcessData : IProcessData
pages.Add(pagePDFFile, pageText);
}
}
if (!pages.Any())
if (pages.Count == 0)
{
java.io.File file = new(sourceFileNamePdf);
org.apache.pdfbox.util.Splitter splitter = new();
@ -745,7 +745,7 @@ public class ProcessData : IProcessData
}
foreach (KeyValuePair<string, List<Detail>> keyValuePair in slots)
{
if (!keyValuePair.Value.Any() || keyValuePair.Value[0] is null)
if (keyValuePair.Value.Count == 0 || keyValuePair.Value[0] is null)
missingSlots.Add(string.Concat("Slot ", keyValuePair.Key, ") is missing."));
else
{
@ -753,7 +753,7 @@ public class ProcessData : IProcessData
_Details.Add(data);
}
}
if (missingSlots.Any())
if (missingSlots.Count != 0)
{
string missingSlotsFile = string.Concat(sourcePath, @"\", sourceFileNameWithoutExtension, "_MissingSlots.txt");
File.WriteAllLines(missingSlotsFile, missingSlots);