public SingleTestSandbox(ILogger logger, DockerClient dockerClient, CompileTestSourceRequest singleTestCreationRequest, Types.Compiler compiler) : base(logger, dockerClient, singleTestCreationRequest, compiler) { this._singleRequest = singleTestCreationRequest; // Raise our completion event when the base is raised. base.CompletedEvent += this.HandleBaseSandboxCompletionEvent; }
/// <summary> /// Creates a new sandbox and performs the compiling process with a supporting test. /// </summary> /// <param name="request">The request that will contain the sandbox details.</param> /// <param name="compiler">The compiler being used for the process.</param> internal async Task HandleSingleCompileTestSandboxRequest(CompileTestSourceRequest request, Types.Compiler compiler) { var sandbox = new SingleTestSandbox(this._logger, this._dockerClient, request, compiler); this.AddSandbox(sandbox); sandbox.StatusChangeEvent += this.OnStatusChangeEvent; sandbox.CompletedEvent += this.OnSingleTestCompileSandboxCompletionEvent; await sandbox.Run(); }
/// <summary> /// Publishes a request to compile and execute the code with support of a singlet test case. /// </summary> /// <param name="request">The request that would be compiled.</param> public async Task PublishSingleTestCompileSourceRequest(CompileTestSourceRequest request) { await this._producer.PublishAsync("compiling", JsonConvert.SerializeObject(request)); }