コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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 ]=-");
     }
 }
コード例 #3
0
ファイル: SandboxHandler.cs プロジェクト: zizidzhelil/Boxer
 public async Task HandleAsync(SandboxRequest command, CancellationToken cancellationToken = default)
 {
     await _sandbox.Run(command.Scripts, cancellationToken);
 }