diff --git a/Adaptation/Shared/Metrology/WS.cs b/Adaptation/Shared/Metrology/WS.cs index 4e43fa3..c49e61d 100644 --- a/Adaptation/Shared/Metrology/WS.cs +++ b/Adaptation/Shared/Metrology/WS.cs @@ -78,20 +78,32 @@ public partial class WS { foreach (Attachment attachment in headerAttachments) { - directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception(); - File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true); - AttachFile(url, attachment); + directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception(); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); } } if (dataAttachments is not null) { foreach (Attachment attachment in dataAttachments) { - directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception(); - File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true); - AttachFile(url, attachment); + directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception(); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); } } + if (headerAttachments is not null) + { + foreach (Attachment attachment in headerAttachments) + AttachFile(url, attachment); + } + if (dataAttachments is not null) + { + foreach (Attachment attachment in dataAttachments) + AttachFile(url, attachment); + } //MessageBox.Show(r.ToString()); } catch (Exception e) diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs index d65b713..d17f988 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs @@ -19,6 +19,8 @@ public class R34 : EAFLoggingUnitTesting internal static string DummyRoot { get; private set; } internal static R34 EAFLoggingUnitTesting { get; private set; } + static R34() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs index ca9d02d..2ca0330 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs @@ -19,6 +19,8 @@ public class R36 : EAFLoggingUnitTesting internal static string DummyRoot { get; private set; } internal static R36 EAFLoggingUnitTesting { get; private set; } + static R36() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs index bd8d3cf..2450227 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs @@ -19,15 +19,11 @@ public class R34_EQPT _R34_EQPT = CreateSelfDescription.Staging.v2_56_0.R34_EQPT.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs index 99db3f2..7aace27 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs @@ -29,7 +29,7 @@ public class R34 [TestMethod] public void Staging__v2_56_0__R34__jpeg() => _R34.Staging__v2_56_0__R34__jpeg(); -#if DEBUG +#if (!DEBUG) [Ignore] #endif [TestMethod] diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/R36-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/R36-EQPT.cs deleted file mode 100644 index 196072d..0000000 --- a/Adaptation/_Tests/Extract/Staging/v2.56.0/R36-EQPT.cs +++ /dev/null @@ -1,29 +0,0 @@ -#if true -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adaptation._Tests.Extract.Staging.v2_56_0; - -[TestClass] -public class R36_EQPT -{ - -#pragma warning disable CA2254 -#pragma warning disable IDE0060 - - private static CreateSelfDescription.Staging.v2_56_0.R36_EQPT _R36_EQPT; - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - CreateSelfDescription.Staging.v2_56_0.R36_EQPT.ClassInitialize(testContext); - _R36_EQPT = CreateSelfDescription.Staging.v2_56_0.R36_EQPT.EAFLoggingUnitTesting; - } - -#if DEBUG - [Ignore] -#endif - [TestMethod] - public void Staging__v2_56_0__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_56_0__R36_EQPT__DownloadJpegFile(); - -} -#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/R36.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/R36.cs deleted file mode 100644 index 633615a..0000000 --- a/Adaptation/_Tests/Extract/Staging/v2.56.0/R36.cs +++ /dev/null @@ -1,29 +0,0 @@ -#if true -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adaptation._Tests.Extract.Staging.v2_56_0; - -[TestClass] -public class R36 -{ - -#pragma warning disable CA2254 -#pragma warning disable IDE0060 - - private static CreateSelfDescription.Staging.v2_56_0.R36 _R36; - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - CreateSelfDescription.Staging.v2_56_0.R36.ClassInitialize(testContext); - _R36 = CreateSelfDescription.Staging.v2_56_0.R36.EAFLoggingUnitTesting; - } - -#if DEBUG - [Ignore] -#endif - [TestMethod] - public void Staging__v2_56_0__R36__jpeg() => _R36.Staging__v2_56_0__R36__jpeg(); - -} -#endif \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 37b2fdc..2acfe41 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.52.0.0")] -[assembly: AssemblyFileVersion("2.52.0.0")] +[assembly: AssemblyVersion("2.56.0.0")] +[assembly: AssemblyFileVersion("2.56.0.0")]