private void OnMultipleSandboxCompletionEvent(object sender, MultipleSandboxCompletionEventArgs args) { var wrapper = (MultipleTestSandboxWrapper)sender; wrapper.CompletedEvent -= this.OnMultipleSandboxCompletionEvent; // TODO: Track these and remove them once complete. var testCaseResult = args.Response.Results.Select(e => new CompileTestSourceResponse(args.Id, e.Result, e.Status, e.TestCaseResult)) .ToList(); var response = new CompileMultipleTestsSourceResponse(args.Id, args.Response.Result, args.Response.Status, testCaseResult); this._logger.LogInformation($"multiple test: {JsonConvert.SerializeObject(response)}"); this._publisher.PublishMultipleTestCompileSourceResponse(response) .FireAndForgetSafeAsync(this.HandleSandboxCompleteFailedException); }
/// <summary> /// Publishes a response to a multiple test compiled and tested response. /// </summary> /// <param name="response">The response that has been compiled.</param> public async Task PublishMultipleTestCompileSourceResponse(CompileMultipleTestsSourceResponse response) { await this._producer.PublishAsync("compiled", JsonConvert.SerializeObject(response)); }