From 523bb86f28158efe34b285ba07b2500ea59d09d1 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 10 Dec 2024 20:15:36 +0200 Subject: Fixed CE crash with no light inks. --- .../PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs b/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs index 27256cbdb..17785bb3c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs @@ -59,6 +59,7 @@ namespace Tango.PPC.DataSynchronizer.CLI OverrideData(); UpdateMachine(); + //ProvisionMachine(); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Synchronization Completed Successfully."); @@ -113,5 +114,27 @@ namespace Tango.PPC.DataSynchronizer.CLI throw new InvalidOperationException(result.Output); } } + + private void ProvisionMachine() + { + Console.WriteLine("Executing provision machine script..."); + + ExaminerConfigurationBuilder builder = new ExaminerConfigurationBuilder(ExaminerConfigurationType.ProvisionMachine); + builder.SetSource(source).SetTarget(target).SetMachineSerialNumber(MACHINE_SERIAL_NUMBER).Synchronize(); + var process = new ExaminerProcess(builder.Build(), ExaminerProcessType.Data); + process.Progress += (x, msg) => + { + if (msg != null && !msg.Contains("SQL Examiner")) + { + Console.WriteLine(msg); + } + }; + var result = process.Execute().Result; + + if (result.ExitCode != ExaminerProcessExitCode.Success) + { + throw new InvalidOperationException(result.Output); + } + } } } -- cgit v1.3.1