Zero _TickOffset
IDE0060
This commit is contained in:
parent
d66314568c
commit
0c786f1f31
@ -92,8 +92,9 @@ csharp_using_directive_placement = outside_namespace
|
||||
dotnet_code_quality_unused_parameters = all
|
||||
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
||||
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||
dotnet_diagnostic.CA1510.severity = none # CA1510: Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance
|
||||
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
|
||||
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
|
||||
dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations
|
||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
||||
|
12
Adaptation/.vscode/tasks.json
vendored
12
Adaptation/.vscode/tasks.json
vendored
@ -49,6 +49,16 @@
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Format-Whitespaces",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"format",
|
||||
"whitespace"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Nuget Clear",
|
||||
"command": "dotnet",
|
||||
@ -68,7 +78,7 @@
|
||||
"args": [
|
||||
"/target:Build",
|
||||
"/restore:True",
|
||||
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
|
||||
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
|
||||
"/detailedsummary",
|
||||
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
||||
|
@ -115,10 +115,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private void MoveArchive(string reportFullPath, DateTime dateTime)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||
|
@ -100,8 +100,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
return results;
|
||||
|
@ -227,7 +227,7 @@ public class FromIQS
|
||||
private static void FlagDuplicates(string connectionString, string json)
|
||||
{
|
||||
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true};
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
|
||||
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
Root? root;
|
||||
@ -244,14 +244,9 @@ public class FromIQS
|
||||
}
|
||||
if (collection.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
string commandText = GetCommandText(collection);
|
||||
File.WriteAllText("D:/.sql", commandText);
|
||||
_ = ExecuteNonQuery(connectionString, commandText);
|
||||
}
|
||||
catch (Exception)
|
||||
{ }
|
||||
string commandText = GetCommandText(collection);
|
||||
File.WriteAllText("D:/.sql", commandText);
|
||||
_ = ExecuteNonQuery(connectionString, commandText);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -271,9 +266,15 @@ public class FromIQS
|
||||
else
|
||||
dateTime = logistics.DateTimeFromSequence;
|
||||
commandText = GetCommandText(dateTime);
|
||||
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||
if (stringBuilder.Length > 0)
|
||||
FlagDuplicates(connectionString, stringBuilder.ToString());
|
||||
try
|
||||
{
|
||||
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||
if (stringBuilder.Length > 0)
|
||||
FlagDuplicates(connectionString, stringBuilder.ToString());
|
||||
}
|
||||
catch (Exception)
|
||||
{ stringBuilder = new(); }
|
||||
_ = stringBuilder.Clear();
|
||||
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
|
||||
for (short i = 0; i < short.MaxValue; i++)
|
||||
{
|
||||
|
@ -6,22 +6,22 @@ namespace Adaptation.FileHandlers.OpenInsight;
|
||||
public class Root
|
||||
{
|
||||
|
||||
[JsonPropertyName("count_se_sgtm")] public long CountSeSgtm { get; }
|
||||
[JsonPropertyName("date_time")] public DateTime DateTime { get; }
|
||||
[JsonPropertyName("max_max_se_test")] public long MaxMaxSeTest { get; }
|
||||
[JsonPropertyName("max_max_se_test_name")] public string MaxMaxSeTestName { get; }
|
||||
[JsonPropertyName("max_max_se_val")] public double MaxMaxSeVal { get; }
|
||||
[JsonPropertyName("max_se_lot")] public long MaxSeLot { get; }
|
||||
[JsonPropertyName("max_se_lot_name")] public string MaxSeLotName { get; }
|
||||
[JsonPropertyName("max_se_part")] public long MaxSePart { get; }
|
||||
[JsonPropertyName("max_se_part_name")] public string MaxSePartName { get; }
|
||||
[JsonPropertyName("max_se_prcs")] public long MaxSePrcs { get; }
|
||||
[JsonPropertyName("max_se_prcs_name")] public string MaxSePrcsName { get; }
|
||||
[JsonPropertyName("max_se_sgrp")] public long MaxSeSgrp { get; }
|
||||
[JsonPropertyName("min_min_se_test")] public long MinMinSeTest { get; }
|
||||
[JsonPropertyName("min_min_se_test_name")] public string MinMinSeTestName { get; }
|
||||
[JsonPropertyName("min_min_se_val")] public double MinMinSeVal { get; }
|
||||
[JsonPropertyName("min_se_sgrp")] public long MinSeSgrp { get; }
|
||||
public long CountSeSgtm { get; } // [JsonPropertyName("count_se_sgtm")]
|
||||
public DateTime DateTime { get; } // [JsonPropertyName("date_time")]
|
||||
public long MaxMaxSeTest { get; } // [JsonPropertyName("max_max_se_test")]
|
||||
public string MaxMaxSeTestName { get; } // [JsonPropertyName("max_max_se_test_name")]
|
||||
public double MaxMaxSeVal { get; } // [JsonPropertyName("max_max_se_val")]
|
||||
public long MaxSeLot { get; } // [JsonPropertyName("max_se_lot")]
|
||||
public string MaxSeLotName { get; } // [JsonPropertyName("max_se_lot_name")]
|
||||
public long MaxSePart { get; } // [JsonPropertyName("max_se_part")]
|
||||
public string MaxSePartName { get; } // [JsonPropertyName("max_se_part_name")]
|
||||
public long MaxSePrcs { get; } // [JsonPropertyName("max_se_prcs")]
|
||||
public string MaxSePrcsName { get; } // [JsonPropertyName("max_se_prcs_name")]
|
||||
public long MaxSeSgrp { get; } // [JsonPropertyName("max_se_sgrp")]
|
||||
public long MinMinSeTest { get; } // [JsonPropertyName("min_min_se_test")]
|
||||
public string MinMinSeTestName { get; } // [JsonPropertyName("min_min_se_test_name")]
|
||||
public double MinMinSeVal { get; } // [JsonPropertyName("min_min_se_val")]
|
||||
public long MinSeSgrp { get; } // [JsonPropertyName("min_se_sgrp")]
|
||||
|
||||
[JsonConstructor]
|
||||
public Root(long countSeSgtm, DateTime dateTime, long maxMaxSeTest, string maxMaxSeTestName, double maxMaxSeVal, long maxSeLot, string maxSeLotName, long maxSePart, string maxSePartName, long maxSePrcs, string maxSePrcsName, long maxSeSgrp, long minMinSeTest, string minMinSeTestName, double minMinSeVal, long minSeSgrp)
|
||||
|
@ -167,10 +167,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _GhostPCLFileName, descriptions, matchDirectories[0], subGroupId, headerId, headerIdDirectory);
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
|
@ -108,10 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
FileInfo fileInfo = new(reportFullPath);
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||
|
@ -145,8 +145,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
|
||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
return results;
|
||||
|
@ -97,7 +97,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
if (_Logistics.FileInfo.Length < _MinFileLength)
|
||||
|
@ -1033,10 +1033,10 @@ public class ProcessData : IProcessData
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (fileRead is null)
|
||||
throw new ArgumentNullException(nameof(fileRead));
|
||||
Detail dataFile;
|
||||
foreach (string file in Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), "WaferMap*.prn", SearchOption.TopDirectoryOnly))
|
||||
fileInfoCollection.Add(new FileInfo(file));
|
||||
|
@ -58,7 +58,7 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
public void Production()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
StringBuilder results = new();
|
||||
@ -66,12 +66,12 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
new("MET08DDUPSP1TBI", "v2.57.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
|
||||
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||
{
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||
}
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
|
@ -204,7 +204,7 @@ public class TXT : LoggingUnitTesting, IDisposable
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
public void Production()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
StringBuilder results = new();
|
||||
@ -213,12 +213,12 @@ public class TXT : LoggingUnitTesting, IDisposable
|
||||
new("SP101", "v2.57.0"),
|
||||
new("SP101-EQPT", "v2.57.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
|
||||
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||
{
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||
}
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
|
Loading…
x
Reference in New Issue
Block a user