Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a60d4b0

Browse files
authored
Fix up static field names in Console (#28300)
1 parent ab65f5e commit a60d4b0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/System.Console/src/System/Console.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public static class Console
2222
private static bool s_isOutTextWriterRedirected = false;
2323
private static bool s_isErrorTextWriterRedirected = false;
2424

25-
private static ConsoleCancelEventHandler _cancelCallbacks;
26-
private static ConsolePal.ControlCHandlerRegistrar _registrar;
25+
private static ConsoleCancelEventHandler s_cancelCallbacks;
26+
private static ConsolePal.ControlCHandlerRegistrar s_registrar;
2727

2828
internal static T EnsureInitialized<T>(ref T field, Func<T> initializer) where T : class =>
2929
LazyInitializer.EnsureInitialized(ref field, ref InternalSyncObject, initializer);
@@ -334,25 +334,25 @@ public static event ConsoleCancelEventHandler CancelKeyPress
334334
{
335335
lock (InternalSyncObject)
336336
{
337-
_cancelCallbacks += value;
337+
s_cancelCallbacks += value;
338338

339339
// If we haven't registered our control-C handler, do it.
340-
if (_registrar == null)
340+
if (s_registrar == null)
341341
{
342-
_registrar = new ConsolePal.ControlCHandlerRegistrar();
343-
_registrar.Register();
342+
s_registrar = new ConsolePal.ControlCHandlerRegistrar();
343+
s_registrar.Register();
344344
}
345345
}
346346
}
347347
remove
348348
{
349349
lock (InternalSyncObject)
350350
{
351-
_cancelCallbacks -= value;
352-
if (_registrar != null && _cancelCallbacks == null)
351+
s_cancelCallbacks -= value;
352+
if (s_registrar != null && s_cancelCallbacks == null)
353353
{
354-
_registrar.Unregister();
355-
_registrar = null;
354+
s_registrar.Unregister();
355+
s_registrar = null;
356356
}
357357
}
358358
}
@@ -690,7 +690,7 @@ public static void Write(String value)
690690

691691
internal static bool HandleBreakEvent(ConsoleSpecialKey controlKey)
692692
{
693-
ConsoleCancelEventHandler handler = _cancelCallbacks;
693+
ConsoleCancelEventHandler handler = s_cancelCallbacks;
694694
if (handler == null)
695695
{
696696
return false;

0 commit comments

Comments
 (0)