private static void Run(ISandbox sandbox, Boolean controlledEnv = true) { Console.WriteLine("-=[ Start Emulation ]=-"); if (controlledEnv) { try { sandbox.Run(); } catch (Exception e) { Console.WriteLine("EX: " + e.ToString()); // Exception due to some limitation in this emulator Console.WriteLine("-=[ Emulation Completed ]=-"); } } else { sandbox.Run(); } }
private static void Run(ISandbox sandbox) { try { Console.WriteLine("-=[ Start Emulation ]=-"); sandbox.Run(); } catch { /* Exception due to some limitation in this emulator */ Console.WriteLine("-=[ Emulation Completed ]=-"); } }
public async Task HandleAsync(SandboxRequest command, CancellationToken cancellationToken = default) { await _sandbox.Run(command.Scripts, cancellationToken); }