110 lines
4.1 KiB
C#
110 lines
4.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.Json;
|
|
|
|
namespace Adaptation.Shared.Metrology
|
|
{
|
|
|
|
public class Duplicator
|
|
{
|
|
|
|
public class Description : IProcessDataDescription
|
|
{
|
|
|
|
public int Test { get; set; }
|
|
public int Count { get; set; }
|
|
public int Index { get; set; }
|
|
//
|
|
public string EventName { get; set; }
|
|
public string NullData { get; set; }
|
|
public string JobID { get; set; }
|
|
public string Sequence { get; set; }
|
|
public string MesEntity { get; set; }
|
|
public string ReportFullPath { get; set; }
|
|
public string ProcessJobID { get; set; }
|
|
public string MID { get; set; }
|
|
public string Date { get; set; } //2021-02-22
|
|
|
|
public string GetEventDescription() { return "File Has been read and parsed"; }
|
|
|
|
public List<string> GetHeaderNames(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
List<string> results = new List<string>();
|
|
return results;
|
|
}
|
|
|
|
public List<string> GetDetailNames(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
List<string> results = new List<string>();
|
|
return results;
|
|
}
|
|
|
|
public List<string> GetParameterNames(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
List<string> results = new List<string>();
|
|
return results;
|
|
}
|
|
|
|
public List<string> GetPairedParameterNames(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
List<string> results = new List<string>();
|
|
return results;
|
|
}
|
|
|
|
public List<string> GetIgnoreParameterNames(ILogic logic, ConfigDataBase configDataBase, Test test)
|
|
{
|
|
List<string> results = new List<string>();
|
|
return results;
|
|
}
|
|
|
|
public List<string> GetNames(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
List<string> results = new List<string>();
|
|
IProcessDataDescription processDataDescription = GetDefault(logic, configDataBase);
|
|
string json = JsonSerializer.Serialize(processDataDescription, processDataDescription.GetType());
|
|
object @object = JsonSerializer.Deserialize<object>(json);
|
|
if (!(@object is JsonElement jsonElement))
|
|
throw new Exception();
|
|
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
|
results.Add(jsonProperty.Name);
|
|
return results;
|
|
}
|
|
|
|
public IProcessDataDescription GetDisplayNames(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
Description result = new Description();
|
|
return result;
|
|
}
|
|
|
|
public IProcessDataDescription GetDefault(ILogic logic, ConfigDataBase configDataBase)
|
|
{
|
|
Description result = new Description
|
|
{
|
|
Test = -1,
|
|
Count = 0,
|
|
Index = -1,
|
|
//
|
|
EventName = configDataBase.GetEventName(),
|
|
NullData = string.Empty,
|
|
JobID = logic.Logistics.JobID,
|
|
Sequence = logic.Logistics.Sequence.ToString(),
|
|
MesEntity = logic.Logistics.MesEntity,
|
|
ReportFullPath = logic.Logistics.ReportFullPath,
|
|
ProcessJobID = logic.Logistics.ProcessJobID,
|
|
MID = logic.Logistics.MID,
|
|
Date = logic.Logistics.DateTimeFromSequence.ToUniversalTime().ToString("MM/dd/yyyy HH:mm:ss"),
|
|
};
|
|
return result;
|
|
}
|
|
|
|
public List<IProcessDataDescription> GetDescription(ILogic logic, ConfigDataBase configDataBase, List<Test> tests, IProcessData iProcessData)
|
|
{
|
|
List<IProcessDataDescription> results = new List<IProcessDataDescription>();
|
|
return results;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |