Complete Class

This commit is contained in:
2024-10-31 09:53:26 -07:00
parent bb1552d210
commit 2b16357d44
18 changed files with 671 additions and 82 deletions

View File

@ -9,6 +9,7 @@ using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
namespace Adaptation.FileHandlers.InterceptIQS;
@ -111,8 +112,17 @@ public class FileRead : Shared.FileRead, IFileRead
private void ReWriteFile(string reportFullPath, DateTime dateTime)
{
string text = File.ReadAllText(reportFullPath);
List<string> segments = text.Split(new string[] { "," }, StringSplitOptions.None).ToList();
string text;
List<string> segments = new();
for (int i = 0; i < _FileConnectorConfiguration.ConnectionRetryInterval; i++)
{
segments.Clear();
text = File.ReadAllText(reportFullPath);
segments.AddRange(text.Split(new string[] { "," }, StringSplitOptions.None));
if (segments.Count == 22)
break;
Thread.Sleep(500);
}
if (segments.Count == 22)
{
string rds = segments[2];