net8.0
v2_52_0-Tests editorconfig yml ec fix yml explicit contents dotnet_diagnostic CA1862 and GetWeekOfYear for WritePDSF gitignore cellInstanceVersion.EdaConnection.PortNumber Added Climatec to Test.cs GetJobIdDirectory Remove and Remove Microsoft.AspNet.WebApi.SelfHost 5-Other-Small
This commit is contained in:
@ -6,7 +6,6 @@ using Adaptation.Shared.Methods;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
@ -109,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
else
|
||||
{
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _SheetName);
|
||||
if (!iProcessData.Details.Any())
|
||||
if (iProcessData.Details.Count == 0)
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
string json = iProcessData.Details[0].ToString();
|
||||
string fileName = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, $"{Path.GetFileNameWithoutExtension(reportFullPath)} - {_SheetName}{_FileConnectorConfiguration.TargetFileName}");
|
||||
|
@ -160,7 +160,7 @@ public class ProcessData : IProcessData
|
||||
if (!fileRead.IsEAFHosted)
|
||||
File.WriteAllText(".json", json);
|
||||
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
|
||||
if (jsonElements is null || !jsonElements.Any())
|
||||
if (jsonElements is null || jsonElements.Length == 0)
|
||||
throw new NullReferenceException();
|
||||
if (!fileRead.ReportFullPath.Contains("Backlog"))
|
||||
json = JsonSerializer.Serialize(jsonElements, new JsonSerializerOptions() { WriteIndented = true });
|
||||
|
Reference in New Issue
Block a user