mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 17:57:57 +01:00
Fix Non-nullable property 'DriverName' must contain a non-null value when exiting constructor.
This commit is contained in:
@@ -99,7 +99,8 @@ public abstract class InputProcessor<T> : IInputProcessor
|
||||
/// Key converter for translating driver specific
|
||||
/// <typeparamref name="T"/> class into Terminal.Gui <see cref="Key"/>.
|
||||
/// </param>
|
||||
protected InputProcessor (ConcurrentQueue<T> inputBuffer, IKeyConverter<T> keyConverter)
|
||||
/// <param name="driverName"></param>
|
||||
protected InputProcessor (ConcurrentQueue<T> inputBuffer, IKeyConverter<T> keyConverter, string driverName)
|
||||
{
|
||||
InputBuffer = inputBuffer;
|
||||
Parser.HandleMouse = true;
|
||||
@@ -123,6 +124,7 @@ public abstract class InputProcessor<T> : IInputProcessor
|
||||
return true;
|
||||
};
|
||||
KeyConverter = keyConverter;
|
||||
DriverName = driverName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -20,10 +20,7 @@ public class NetInputProcessor : InputProcessor<ConsoleKeyInfo>
|
||||
#pragma warning restore CA2211
|
||||
|
||||
/// <inheritdoc/>
|
||||
public NetInputProcessor (ConcurrentQueue<ConsoleKeyInfo> inputBuffer) : base (inputBuffer, new NetKeyConverter ())
|
||||
{
|
||||
DriverName = "net";
|
||||
}
|
||||
public NetInputProcessor (ConcurrentQueue<ConsoleKeyInfo> inputBuffer) : base (inputBuffer, new NetKeyConverter (), "net") { }
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void Process (ConsoleKeyInfo consoleKeyInfo)
|
||||
|
||||
@@ -8,10 +8,7 @@ namespace Terminal.Gui.Drivers;
|
||||
internal class UnixInputProcessor : InputProcessor<char>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public UnixInputProcessor (ConcurrentQueue<char> inputBuffer) : base (inputBuffer, new UnixKeyConverter ())
|
||||
{
|
||||
DriverName = "unix";
|
||||
}
|
||||
public UnixInputProcessor (ConcurrentQueue<char> inputBuffer) : base (inputBuffer, new UnixKeyConverter (), "unix") { }
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Process (char input)
|
||||
|
||||
@@ -13,10 +13,7 @@ internal class WindowsInputProcessor : InputProcessor<InputRecord>
|
||||
private readonly bool [] _lastWasPressed = new bool[4];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public WindowsInputProcessor (ConcurrentQueue<InputRecord> inputBuffer) : base (inputBuffer, new WindowsKeyConverter ())
|
||||
{
|
||||
DriverName = "win";
|
||||
}
|
||||
public WindowsInputProcessor (ConcurrentQueue<InputRecord> inputBuffer) : base (inputBuffer, new WindowsKeyConverter (), "win") { }
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void Process (InputRecord inputEvent)
|
||||
|
||||
Reference in New Issue
Block a user