using Adaptation.Shared; using Adaptation.Shared.Properties; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; namespace Adaptation.FileHandlers.DEP08SIASM; public class ProcessData { internal static List> HyphenTuples => new() { new Tuple(0, Hyphen.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"), new Tuple(15, Hyphen.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"), new Tuple(-361, Hyphen.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"), new Tuple(362, Hyphen.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"), new Tuple(-363, Hyphen.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"), new Tuple(-3604, Hyphen.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"), new Tuple(-365, Hyphen.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"), new Tuple(1806, Hyphen.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"), new Tuple(367, Hyphen.IsArchive, @"\EC_Characterization_Si\Processed") // new Tuple(1808, Hyphen.IsDummy }; internal static string GetLines(IFileRead fileRead, Logistics logistics, List descriptions) { StringBuilder result = new(); if (fileRead is null) { } if (logistics is null) { } if (descriptions is null) { } return result.ToString(); } internal static async void PutOpenInsightCommonGatewayInterfaceReactorStatesStatus(IFileRead fileRead, Logistics logistics, HttpClient httpClient, List descriptions) { if (fileRead is null) { } HttpContent httpContent = null; string status = descriptions[0].MID; string reactorNumber = logistics.MesEntity.Substring(1); string statusDateTime = logistics.DateTimeFromSequence.ToString("MM-dd-yyyy HH:mm:ss"); Uri uri = new($"{httpClient.BaseAddress.OriginalString}reactno={reactorNumber}&status={status}&statusdtm={statusDateTime}"); try { HttpResponseMessage httpResponseMessage = await httpClient.PutAsync(uri, httpContent); if (httpResponseMessage.StatusCode is System.Net.HttpStatusCode.OK) { string content = await httpResponseMessage.Content.ReadAsStringAsync(); if (string.IsNullOrEmpty(content)) { } } } catch (Exception ex) { status = ex.Message; if (string.IsNullOrEmpty(status)) { } } } }