Complete Class
This commit is contained in:
		| @ -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]; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user