public async Task <SubmitCode> SubmitCode(KernelBase kernel, string codeFragment, SubmissionType submissionType = SubmissionType.Run) { var command = new SubmitCode(codeFragment, submissionType: submissionType); await kernel.SendAsync(command); return(command); }
public async Task SubmitCode(KernelBase kernel, string[] codeFragments, SubmissionType submissionType = SubmissionType.Run) { foreach (var codeFragment in codeFragments) { var cmd = new SubmitCode(codeFragment, submissionType: submissionType); await kernel.SendAsync(cmd); } }
public async Task SubmitCode(KernelBase kernel, string[] submissions, SubmissionType submissionType = SubmissionType.Run) { foreach (var submission in submissions) { var cmd = new SubmitCode(submission, submissionType: submissionType); await kernel.SendAsync(cmd); } }
public async Task <SubmitCode[]> SubmitCode(KernelBase kernel, string[] codeFragments, SubmissionType submissionType = SubmissionType.Run) { var commands = new List <SubmitCode>(); foreach (var codeFragment in codeFragments) { var cmd = new SubmitCode(codeFragment, submissionType: submissionType); await kernel.SendAsync(cmd); commands.Add(cmd); } return(commands.ToArray()); }
public async Task SubmitCode(KernelBase kernel, string submission, SubmissionType submissionType = SubmissionType.Run) { var command = new SubmitCode(submission, submissionType: submissionType); await kernel.SendAsync(command); }
private Task <IKernelCommandResult> SendHoverRequest(KernelBase kernel, string code, int line, int character) { var command = new RequestHoverText(RequestHoverText.MakeDataUriFromContents(code), new LinePosition(line, character)); return(kernel.SendAsync(command)); }