static void Main(string[] args) { //Do not change any code in current method! Use ExecuteScript method in Script.cs instead try { _testBed = new Core.TestBed(Config.ProtocolFilePath, new ReportOutMock()); _testBed.ExecuteConsole(); if (!string.IsNullOrEmpty(Out.Error)) { Console.WriteLine("Script execution completed with errors."); Console.WriteLine(Out.Error); } else { foreach (var outData in Out.OutStrings) { Console.WriteLine(outData); } } Console.WriteLine("Script execution completed. Press any key to exit."); } catch (Exception e) { Console.WriteLine($"Failed to execute script: {e.Message}"); } Console.ReadKey(); }
static void Main(string[] args) { //Do not change any code in current method! Use ExecuteScript method in Script.cs instead try { _testBed = new Core.TestBed(Config.ProtocolFilePath, new Data.Roslyn.ReportOut()); _testBed.ExecuteReport(Config.ReportOutType, Config.ScriptId); if (!string.IsNullOrEmpty(Out.Error)) { Console.WriteLine("Script execution completed with errors."); Console.WriteLine(Out.Error); Console.ReadKey(); } } catch (Exception e) { Console.WriteLine($"Failed to execute script: {e.Message}"); Console.ReadKey(); } }