From 6634e2bc78a247a9fb701e9830f7d42ddfb8f8be Mon Sep 17 00:00:00 2001 From: Evgeny Gorbovoy Date: Tue, 21 Nov 2023 11:16:39 +0100 Subject: [PATCH] + rules satisfied --- src/Consolonia.PlatformSupport/WindowsConsole.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Consolonia.PlatformSupport/WindowsConsole.cs b/src/Consolonia.PlatformSupport/WindowsConsole.cs index ce7f7546..1b8c8d45 100644 --- a/src/Consolonia.PlatformSupport/WindowsConsole.cs +++ b/src/Consolonia.PlatformSupport/WindowsConsole.cs @@ -63,7 +63,7 @@ public Win32Console() #region chatGPT [StructLayout(LayoutKind.Sequential)] - public struct INPUT_RECORD + private struct INPUT_RECORD { public ushort EventType; public UnionRecord Event; @@ -80,20 +80,26 @@ public struct UnionRecord } [StructLayout(LayoutKind.Sequential)] - public struct KEY_EVENT_RECORD + internal struct KEY_EVENT_RECORD { +#pragma warning disable IDE1006 public bool bKeyDown; +#pragma warning restore IDE1006 // Other fields omitted for brevity } [StructLayout(LayoutKind.Sequential)] - public struct FOCUS_EVENT_RECORD + private struct FOCUS_EVENT_RECORD { +#pragma warning disable IDE1006 public bool bSetFocus; +#pragma warning restore IDE1006 } [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - public static extern bool WriteConsoleInput( +#pragma warning disable CA5392 + private static extern bool WriteConsoleInput( +#pragma warning restore CA5392 IntPtr hConsoleInput, INPUT_RECORD[] lpBuffer, uint nLength,