mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 10:17:55 +01:00
Change Response to a nullable string.
This commit is contained in:
@@ -24,7 +24,7 @@ public class AnsiEscapeSequenceRequest
|
||||
/// <summary>
|
||||
/// Gets the response received from the request.
|
||||
/// </summary>
|
||||
public string Response { get; internal set; } = string.Empty;
|
||||
public string? Response { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raised when the console responds with an ANSI response code that matches the
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class ConsoleDriver
|
||||
/// </summary>
|
||||
/// <param name="ansiRequest">The <see cref="AnsiEscapeSequenceRequest"/> object.</param>
|
||||
/// <returns>The request response.</returns>
|
||||
public abstract string WriteAnsiRequest (AnsiEscapeSequenceRequest ansiRequest);
|
||||
public abstract string? WriteAnsiRequest (AnsiEscapeSequenceRequest ansiRequest);
|
||||
|
||||
// QUESTION: This appears to be an API to help in debugging. It's only implemented in CursesDriver and WindowsDriver.
|
||||
// QUESTION: Can it be factored such that it does not contaminate the ConsoleDriver API?
|
||||
|
||||
@@ -248,7 +248,6 @@ internal class UnixMainLoop : IMainLoopDriver
|
||||
{
|
||||
EscSeqRequests.Statuses.TryDequeue (out _);
|
||||
|
||||
seqReqStatus.AnsiRequest.Response = string.Empty;
|
||||
seqReqStatus.AnsiRequest.RaiseResponseFromInput (seqReqStatus.AnsiRequest, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,6 @@ internal class NetEvents : IDisposable
|
||||
{
|
||||
EscSeqRequests.Statuses.TryDequeue (out _);
|
||||
|
||||
seqReqStatus.AnsiRequest.Response = string.Empty;
|
||||
seqReqStatus.AnsiRequest.RaiseResponseFromInput (seqReqStatus.AnsiRequest, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -992,7 +992,6 @@ internal class WindowsConsole
|
||||
{
|
||||
_mainLoop.EscSeqRequests.Statuses.TryDequeue (out _);
|
||||
|
||||
seqReqStatus.AnsiRequest.Response = string.Empty;
|
||||
seqReqStatus.AnsiRequest.RaiseResponseFromInput (seqReqStatus.AnsiRequest, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user