From: Lee Culver Date: Thu, 30 Mar 2023 22:52:22 +0000 (-0700) Subject: Fix issue where DmlExec isn't implemented in Repl (#3794) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055542~43^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d5ca45cfb4c2448a3b0777b77a2b9f3077e7ac5;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Fix issue where DmlExec isn't implemented in Repl (#3794) * Fix issue where DmlExec isn't implemented in Repl WriteDmlExec is meant to work even if DML is disabled, but the Repl project throws NotSupportedException instead of passing the text argument. * Write the raw output when DML is present Also print output when WriteDml is called. This shouldn't happen in the current codebase, but at least it won't cause the command to stop. --- diff --git a/src/Microsoft.Diagnostics.Repl/ConsoleService.cs b/src/Microsoft.Diagnostics.Repl/ConsoleService.cs index be30dc867..06aaf7b47 100644 --- a/src/Microsoft.Diagnostics.Repl/ConsoleService.cs +++ b/src/Microsoft.Diagnostics.Repl/ConsoleService.cs @@ -589,9 +589,9 @@ namespace Microsoft.Diagnostics.Repl bool IConsoleService.SupportsDml => false; - void IConsoleService.WriteDml(string text) => throw new NotSupportedException(); + void IConsoleService.WriteDml(string text) => WriteOutput(OutputType.Normal, text); - void IConsoleService.WriteDmlExec(string text, string _) => throw new NotSupportedException(); + void IConsoleService.WriteDmlExec(string text, string _) => WriteOutput(OutputType.Normal, text); CancellationToken IConsoleService.CancellationToken { get; set; }