Ready to test
This commit is contained in:
@ -1,182 +0,0 @@
|
||||
using Adaptation.Shared.Metrology;
|
||||
using Eaf.Core;
|
||||
using Eaf.EquipmentCore.Control;
|
||||
using Eaf.EquipmentCore.DataCollection.Reporting;
|
||||
using Eaf.EquipmentCore.SelfDescription.ElementDescription;
|
||||
using Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||
using Ifx.Eaf.EquipmentConnector.File.SelfDescription;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Shared
|
||||
{
|
||||
|
||||
public class Description
|
||||
{
|
||||
|
||||
public enum RowColumn
|
||||
{
|
||||
Test = 1000,
|
||||
Count,
|
||||
Index
|
||||
}
|
||||
|
||||
public enum LogisticsColumn
|
||||
{
|
||||
EventName = 2000,
|
||||
NullData,
|
||||
JobID,
|
||||
Sequence,
|
||||
MesEntity,
|
||||
ReportFullPath,
|
||||
ProcessJobID,
|
||||
MID
|
||||
}
|
||||
|
||||
public enum Param
|
||||
{
|
||||
String = 0,
|
||||
Integer = 2,
|
||||
Double = 3,
|
||||
Boolean = 4,
|
||||
StructuredType = 5
|
||||
}
|
||||
|
||||
internal const string FileFound = "FileFound";
|
||||
|
||||
|
||||
public List<EquipmentParameter> EquipmentParameters { get; private set; }
|
||||
public List<ParameterTypeDefinition> ParameterTypeDefinitions { get; private set; }
|
||||
|
||||
private readonly bool _UseCyclical;
|
||||
private readonly List<string> _HeaderNames;
|
||||
private readonly Dictionary<string, int> _KeyIndexPairs;
|
||||
private readonly ParameterTypeDefinition _StructuredType;
|
||||
private readonly FileConnectorParameterTypeDefinitionProvider _FileConnectorParameterTypeDefinitionProvider;
|
||||
|
||||
public Description(ILogic logic, ConfigDataBase configDataBase, IEquipmentControl equipmentControl)
|
||||
{
|
||||
_KeyIndexPairs = new Dictionary<string, int>();
|
||||
_HeaderNames = configDataBase.GetHeaderNames(logic);
|
||||
_UseCyclical = configDataBase.UseCyclicalForDescription;
|
||||
_StructuredType = new StructuredType(nameof(StructuredType), string.Empty, new List<Field>());
|
||||
_FileConnectorParameterTypeDefinitionProvider = new FileConnectorParameterTypeDefinitionProvider();
|
||||
EquipmentParameters = new List<EquipmentParameter>();
|
||||
ParameterTypeDefinitions = new List<ParameterTypeDefinition> { _StructuredType };
|
||||
Dictionary<string, List<Tuple<Enum, string, string, object>>> keyValuePairsCollection = configDataBase.GetParameterInfo(logic, allowNull: false);
|
||||
List<ParameterValue> results = GetParameterValues(equipmentControl, keyValuePairsCollection);
|
||||
}
|
||||
|
||||
private List<ParameterValue> GetParameterValues(IEquipmentControl equipmentControl, Dictionary<string, List<Tuple<Enum, string, string, object>>> keyValuePairsCollection)
|
||||
{
|
||||
List<ParameterValue> results = new List<ParameterValue>();
|
||||
Enum param;
|
||||
object value;
|
||||
Enum[] @params;
|
||||
string description;
|
||||
List<object[]> list;
|
||||
EquipmentParameter equipmentParameter;
|
||||
ParameterTypeDefinition parameterTypeDefinition;
|
||||
bool addToEquipmentParameters = !EquipmentParameters.Any();
|
||||
foreach (KeyValuePair<string, List<Tuple<Enum, string, string, object>>> keyValuePair in keyValuePairsCollection)
|
||||
{
|
||||
if (!addToEquipmentParameters && !_KeyIndexPairs.ContainsKey(keyValuePair.Key))
|
||||
continue;
|
||||
@params = (from l in keyValuePair.Value select l.Item1).Distinct().ToArray();
|
||||
if (@params.Length != 1)
|
||||
throw new Exception();
|
||||
if (keyValuePair.Value[0].Item2 != keyValuePair.Key)
|
||||
throw new Exception();
|
||||
param = @params[0];
|
||||
if (!addToEquipmentParameters)
|
||||
equipmentParameter = EquipmentParameters[_KeyIndexPairs[keyValuePair.Key]];
|
||||
else
|
||||
{
|
||||
description = keyValuePair.Value[0].Item3;
|
||||
_KeyIndexPairs.Add(keyValuePair.Key, EquipmentParameters.Count());
|
||||
if (param is Param.StructuredType || (_UseCyclical && !_HeaderNames.Contains(keyValuePair.Key)))
|
||||
parameterTypeDefinition = _StructuredType;
|
||||
else
|
||||
parameterTypeDefinition = _FileConnectorParameterTypeDefinitionProvider.GetParameterTypeDefinition(param.ToString());
|
||||
equipmentParameter = new EquipmentParameter(keyValuePair.Key, parameterTypeDefinition, description);
|
||||
EquipmentParameters.Add(equipmentParameter);
|
||||
}
|
||||
if (!_UseCyclical || _HeaderNames.Contains(keyValuePair.Key))
|
||||
value = keyValuePair.Value[0].Item4;
|
||||
else
|
||||
{
|
||||
list = new List<object[]>();
|
||||
for (int i = 0; i < keyValuePair.Value.Count; i++)
|
||||
list.Add(new object[] { i, keyValuePair.Value[i].Item4 });
|
||||
value = list;
|
||||
}
|
||||
if (equipmentControl is null || !(param is Param.StructuredType))
|
||||
results.Add(new ParameterValue(equipmentParameter, value, DateTime.Now));
|
||||
else
|
||||
results.Add(equipmentControl.DataCollection.CreateParameterValue(equipmentParameter, value));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<ParameterValue> GetParameterValues(ILogic logic, IEquipmentControl equipmentControl, JsonElement jsonElement, int? i = null, Dictionary<string, object> keyValuePairs = null)
|
||||
{
|
||||
List<ParameterValue> results = new List<ParameterValue>();
|
||||
if (_UseCyclical && (i is null || i.Value > 0))
|
||||
throw new Exception();
|
||||
if (jsonElement.ValueKind != JsonValueKind.Array)
|
||||
throw new Exception();
|
||||
Enum param;
|
||||
Tuple<Enum, string, string, object> tuple;
|
||||
JsonElement[] jsonElements = jsonElement.EnumerateArray().ToArray();
|
||||
Dictionary<string, List<Tuple<Enum, string, string, object>>> keyValuePairsCollection = new Dictionary<string, List<Tuple<Enum, string, string, object>>>();
|
||||
for (int r = i.Value; r < jsonElements.Length; r++)
|
||||
{
|
||||
foreach (JsonProperty jsonProperty in jsonElement[r].EnumerateObject())
|
||||
{
|
||||
if (jsonProperty.Value.ValueKind == JsonValueKind.Object || jsonProperty.Value.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
param = Param.StructuredType;
|
||||
//jValue = jObject.Value<JValue>("Item1");
|
||||
throw new NotImplementedException("Item1");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (jsonProperty.Value.ValueKind)
|
||||
{
|
||||
case JsonValueKind.String: param = Param.String; break;
|
||||
case JsonValueKind.Number: param = Param.Double; break;
|
||||
case JsonValueKind.True:
|
||||
case JsonValueKind.False: param = Param.Boolean; break;
|
||||
case JsonValueKind.Null: param = Param.String; break;
|
||||
default: param = Param.StructuredType; break;
|
||||
}
|
||||
}
|
||||
tuple = new Tuple<Enum, string, string, object>(param, jsonProperty.Name, string.Empty, jsonProperty.Value.ToString());
|
||||
if (!keyValuePairsCollection.ContainsKey(jsonProperty.Name))
|
||||
keyValuePairsCollection.Add(jsonProperty.Name, new List<Tuple<Enum, string, string, object>>());
|
||||
keyValuePairsCollection[jsonProperty.Name].Add(tuple);
|
||||
}
|
||||
if (!_UseCyclical)
|
||||
break;
|
||||
}
|
||||
results = GetParameterValues(equipmentControl, keyValuePairsCollection);
|
||||
return results;
|
||||
}
|
||||
|
||||
public static string GetCellName()
|
||||
{
|
||||
string result;
|
||||
if (Backbone.Instance?.CellName is null)
|
||||
result = string.Empty;
|
||||
else
|
||||
result = Backbone.Instance.CellName;
|
||||
if (result.Contains("-IO"))
|
||||
result = result.Replace("-IO", string.Empty);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,35 +1,20 @@
|
||||
using Ifx.Eaf.EquipmentConnector.File.Component;
|
||||
using Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using Ifx.Eaf.EquipmentConnector.File.Component;
|
||||
using Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
|
||||
namespace Shared
|
||||
namespace Shared;
|
||||
|
||||
public class FilePathGenerator : Ifx.Eaf.EquipmentConnector.File.Component.FilePathGenerator
|
||||
{
|
||||
|
||||
public class FilePathGenerator : Ifx.Eaf.EquipmentConnector.File.Component.FilePathGenerator
|
||||
{
|
||||
public FileConnectorConfiguration FileConnectorConfiguration { get; private set; }
|
||||
|
||||
public FileConnectorConfiguration FileConnectorConfiguration { get; private set; }
|
||||
public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) : base(config, customPattern) => FileConnectorConfiguration = config;
|
||||
|
||||
public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) : base(config, customPattern)
|
||||
{
|
||||
FileConnectorConfiguration = config;
|
||||
}
|
||||
public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, file, isErrorFile, customPattern) => FileConnectorConfiguration = config;
|
||||
|
||||
public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, file, isErrorFile, customPattern)
|
||||
{
|
||||
FileConnectorConfiguration = config;
|
||||
}
|
||||
public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, sourceFilePath, isErrorFile, customPattern) => FileConnectorConfiguration = config;
|
||||
|
||||
public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, sourceFilePath, isErrorFile, customPattern)
|
||||
{
|
||||
FileConnectorConfiguration = config;
|
||||
}
|
||||
|
||||
public string GetSubFolderPath()
|
||||
{
|
||||
return SubFolderPath;
|
||||
}
|
||||
|
||||
}
|
||||
public string GetSubFolderPath() => SubFolderPath;
|
||||
|
||||
}
|
||||
|
@ -1,67 +1,63 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
|
||||
namespace Shared
|
||||
namespace Shared;
|
||||
|
||||
public class FilePathGeneratorInfo
|
||||
{
|
||||
|
||||
public class FilePathGeneratorInfo
|
||||
public string To { get; protected set; }
|
||||
public string From { get; protected set; }
|
||||
public bool IsErrorFile { get; protected set; }
|
||||
public string SubFolderPath { get; protected set; }
|
||||
public string FirstDirectory { get; protected set; }
|
||||
public string ReportFullPath { get; protected set; }
|
||||
public string ResolvedFileLocation { get; protected set; }
|
||||
|
||||
public FilePathGeneratorInfo(object originalFilePathGenerator, string reportFullPath, bool isErrorFile, System.Collections.Generic.Dictionary<string, string> fileParameter)
|
||||
{
|
||||
|
||||
public string To { get; protected set; }
|
||||
public string From { get; protected set; }
|
||||
public bool IsErrorFile { get; protected set; }
|
||||
public string SubFolderPath { get; protected set; }
|
||||
public string FirstDirectory { get; protected set; }
|
||||
public string ReportFullPath { get; protected set; }
|
||||
public string ResolvedFileLocation { get; protected set; }
|
||||
|
||||
public FilePathGeneratorInfo(object originalFilePathGenerator, string reportFullPath, bool isErrorFile, System.Collections.Generic.Dictionary<string, string> fileParameter)
|
||||
ReportFullPath = reportFullPath;
|
||||
IsErrorFile = isErrorFile;
|
||||
if (originalFilePathGenerator is null || originalFilePathGenerator is not FilePathGenerator original)
|
||||
{
|
||||
ReportFullPath = reportFullPath;
|
||||
IsErrorFile = isErrorFile;
|
||||
if (originalFilePathGenerator is null || !(originalFilePathGenerator is FilePathGenerator))
|
||||
{
|
||||
FirstDirectory = string.Empty;
|
||||
ResolvedFileLocation = string.Empty;
|
||||
To = string.Empty;
|
||||
From = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
string directorySeparatorChar = Path.DirectorySeparatorChar.ToString();
|
||||
FilePathGenerator original = (FilePathGenerator)originalFilePathGenerator;
|
||||
FilePathGenerator filePathGenerator = new FilePathGenerator(original.FileConnectorConfiguration, reportFullPath, isErrorFile);
|
||||
SubFolderPath = filePathGenerator.GetSubFolderPath();
|
||||
if (string.IsNullOrEmpty(SubFolderPath))
|
||||
FirstDirectory = SubFolderPath;
|
||||
else
|
||||
FirstDirectory = SubFolderPath.Split(Path.DirectorySeparatorChar)[0];
|
||||
ResolvedFileLocation = filePathGenerator.GetTargetFolder();
|
||||
if (string.IsNullOrEmpty(ResolvedFileLocation) && string.IsNullOrEmpty(SubFolderPath))
|
||||
To = string.Empty;
|
||||
else if (string.IsNullOrEmpty(SubFolderPath))
|
||||
To = ResolvedFileLocation;
|
||||
else
|
||||
To = string.Concat(ResolvedFileLocation.Replace(SubFolderPath, string.Empty), Path.DirectorySeparatorChar, FirstDirectory);
|
||||
#if (true)
|
||||
if (string.IsNullOrEmpty(original.FileConnectorConfiguration.DefaultPlaceHolderValue))
|
||||
original.FileConnectorConfiguration.DefaultPlaceHolderValue = "NA";
|
||||
if (!(fileParameter is null) && fileParameter.Count == 1 && To.Contains(original.FileConnectorConfiguration.DefaultPlaceHolderValue))
|
||||
{
|
||||
foreach (var keyValuePair in fileParameter)
|
||||
To = To.Replace(string.Concat(original.FileConnectorConfiguration.DefaultPlaceHolderValue), keyValuePair.Value);
|
||||
}
|
||||
#endif
|
||||
if (original.FileConnectorConfiguration.SourceFileLocation.EndsWith(directorySeparatorChar))
|
||||
From = string.Concat(original.FileConnectorConfiguration.SourceFileLocation, FirstDirectory);
|
||||
else
|
||||
From = string.Concat(original.FileConnectorConfiguration.SourceFileLocation, Path.DirectorySeparatorChar, FirstDirectory);
|
||||
if (From.EndsWith(directorySeparatorChar) && !To.EndsWith(directorySeparatorChar))
|
||||
To = string.Concat(To, Path.DirectorySeparatorChar);
|
||||
else if (To.EndsWith(directorySeparatorChar) && !From.EndsWith(directorySeparatorChar))
|
||||
To = To.Remove(To.Length - 1, 1);
|
||||
}
|
||||
FirstDirectory = string.Empty;
|
||||
ResolvedFileLocation = string.Empty;
|
||||
To = string.Empty;
|
||||
From = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
string directorySeparatorChar = Path.DirectorySeparatorChar.ToString();
|
||||
FilePathGenerator filePathGenerator = new(original.FileConnectorConfiguration, reportFullPath, isErrorFile);
|
||||
SubFolderPath = filePathGenerator.GetSubFolderPath();
|
||||
if (string.IsNullOrEmpty(SubFolderPath))
|
||||
FirstDirectory = SubFolderPath;
|
||||
else
|
||||
FirstDirectory = SubFolderPath.Split(Path.DirectorySeparatorChar)[0];
|
||||
ResolvedFileLocation = filePathGenerator.GetTargetFolder();
|
||||
if (string.IsNullOrEmpty(ResolvedFileLocation) && string.IsNullOrEmpty(SubFolderPath))
|
||||
To = string.Empty;
|
||||
else if (string.IsNullOrEmpty(SubFolderPath))
|
||||
To = ResolvedFileLocation;
|
||||
else
|
||||
To = string.Concat(ResolvedFileLocation.Replace(SubFolderPath, string.Empty), Path.DirectorySeparatorChar, FirstDirectory);
|
||||
#if (true)
|
||||
if (string.IsNullOrEmpty(original.FileConnectorConfiguration.DefaultPlaceHolderValue))
|
||||
original.FileConnectorConfiguration.DefaultPlaceHolderValue = "NA";
|
||||
if (fileParameter is not null && fileParameter.Count == 1 && To.Contains(original.FileConnectorConfiguration.DefaultPlaceHolderValue))
|
||||
{
|
||||
foreach (System.Collections.Generic.KeyValuePair<string, string> keyValuePair in fileParameter)
|
||||
To = To.Replace(string.Concat(original.FileConnectorConfiguration.DefaultPlaceHolderValue), keyValuePair.Value);
|
||||
}
|
||||
#endif
|
||||
if (original.FileConnectorConfiguration.SourceFileLocation.EndsWith(directorySeparatorChar))
|
||||
From = string.Concat(original.FileConnectorConfiguration.SourceFileLocation, FirstDirectory);
|
||||
else
|
||||
From = string.Concat(original.FileConnectorConfiguration.SourceFileLocation, Path.DirectorySeparatorChar, FirstDirectory);
|
||||
if (From.EndsWith(directorySeparatorChar) && !To.EndsWith(directorySeparatorChar))
|
||||
To = string.Concat(To, Path.DirectorySeparatorChar);
|
||||
else if (To.EndsWith(directorySeparatorChar) && !From.EndsWith(directorySeparatorChar))
|
||||
To = To.Remove(To.Length - 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
74
Shared/Mapper.cs
Normal file
74
Shared/Mapper.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using System.Collections.Generic;
|
||||
using Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
|
||||
namespace Shared;
|
||||
|
||||
public static class Mapper
|
||||
{
|
||||
|
||||
internal static Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration Map(FileConnectorConfiguration configuration)
|
||||
{
|
||||
Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration result = new()
|
||||
{
|
||||
AlternateTargetFolder = configuration.AlternateTargetFolder,
|
||||
ConnectionRetryInterval = configuration.ConnectionRetryInterval,
|
||||
ConnectionSettings = new List<Adaptation.Ifx.Eaf.Common.Configuration.ConnectionSetting>(),
|
||||
CopySourceFolderStructure = configuration.CopySourceFolderStructure,
|
||||
DefaultPlaceHolderValue = configuration.DefaultPlaceHolderValue,
|
||||
//DeleteAbandonedEmptySourceSubFolders = configuration.DeleteAbandonedEmptySourceSubFolders,
|
||||
DeleteEmptySourceSubFolders = configuration.DeleteEmptySourceSubFolders,
|
||||
ErrorPostProcessingMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.PostProcessingModeEnum)configuration.ErrorPostProcessingMode,
|
||||
ErrorTargetFileLocation = configuration.ErrorTargetFileLocation,
|
||||
ErrorTargetFileName = configuration.ErrorTargetFileName,
|
||||
FileAgeFilterMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.FileAgeFilterEnum)configuration.FileAgeFilterMode,
|
||||
FileAgeThreshold = configuration.FileAgeThreshold,
|
||||
//FileHandlers = configuration.FileHandlers,
|
||||
FileHandleTimeout = (long)configuration.FileHandleTimeout,
|
||||
FileHandleWaitTime = configuration.FileHandleWaitTime,
|
||||
FileScanningIntervalInSeconds = configuration.FileScanningIntervalInSeconds,
|
||||
FileScanningOption = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.FileScanningOptionEnum)configuration.FileScanningOption,
|
||||
FolderAgeCheckIndividualSubFolders = configuration.FolderAgeCheckIndividualSubFolders,
|
||||
FolderAgeThreshold = configuration.FolderAgeThreshold,
|
||||
//FolderOperationsSubFolderLevel = configuration.FolderOperationsSubFolderLevel,
|
||||
IdleEventWaitTimeInSeconds = (long)configuration.IdleEventWaitTimeInSeconds,
|
||||
IfFileExistAction = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.IfFileExistEnum)configuration.IfFileExistAction,
|
||||
IfPostProcessingFailsAction = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.IfPostProcessingFailsEnum)configuration.IfPostProcessingFailsAction,
|
||||
IncludeSubDirectories = configuration.IncludeSubDirectories,
|
||||
PostProcessingRetries = configuration.PostProcessingRetries,
|
||||
PreProcessingMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.PreProcessingModeEnum)configuration.PreProcessingMode,
|
||||
PostProcessingMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.PostProcessingModeEnum)configuration.PostProcessingMode,
|
||||
SourceDirectoryCloaking = configuration.SourceDirectoryCloaking,
|
||||
SourceFileFilter = configuration.SourceFileFilter,
|
||||
SourceFileFilters = configuration.SourceFileFilters,
|
||||
SourceFileLocation = configuration.SourceFileLocation,
|
||||
TargetFileLocation = configuration.TargetFileLocation,
|
||||
TargetFileName = configuration.TargetFileName,
|
||||
TriggerOnChanged = configuration.TriggerOnChanged,
|
||||
TriggerOnCreated = configuration.TriggerOnCreated,
|
||||
UseZip64Mode = configuration.UseZip64Mode,
|
||||
ZipErrorTargetFileName = configuration.ZipErrorTargetFileName,
|
||||
ZipFileAmount = configuration.ZipFileAmount,
|
||||
ZipFileSubFolderLevel = configuration.ZipFileSubFolderLevel,
|
||||
ZipFileTime = configuration.ZipFileTime,
|
||||
ZipMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.ZipModeEnum)configuration.ZipMode,
|
||||
ZipTargetFileName = configuration.ZipTargetFileName,
|
||||
};
|
||||
foreach (Ifx.Eaf.Common.Configuration.ConnectionSetting connectionSetting in configuration.ConnectionSettings)
|
||||
result.ConnectionSettings.Add(new Adaptation.Ifx.Eaf.Common.Configuration.ConnectionSetting(connectionSetting.Name, connectionSetting.Value));
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static IList<Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterDefinition> Map(IList<ModelObjectParameterDefinition> configuredParameters)
|
||||
{
|
||||
List<Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterDefinition> results = new();
|
||||
Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterType modelObjectParameterType;
|
||||
for (int i = 0; i < configuredParameters.Count; i++)
|
||||
{
|
||||
modelObjectParameterType = (Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterType)configuredParameters[i].ValueType;
|
||||
results.Add(new Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterDefinition() { Id = i, Name = configuredParameters[i].Name, Value = configuredParameters[i].Value, ValueType = modelObjectParameterType, EnumType = modelObjectParameterType.ToString() });
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user