Apply frozen collections optimizations

This commit is contained in:
Archi
2024-01-03 13:46:54 +01:00
parent c6b78b118c
commit 12c4b7e924
12 changed files with 40 additions and 38 deletions

View File

@@ -20,8 +20,8 @@
// limitations under the License.
using System;
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.IO;
@@ -58,7 +58,7 @@ internal static class Program {
private static readonly Dictionary<PosixSignal, PosixSignalRegistration> RegisteredPosixSignals = new();
private static readonly TaskCompletionSource<byte> ShutdownResetEvent = new();
private static readonly ImmutableHashSet<PosixSignal> SupportedPosixSignals = ImmutableHashSet.Create(PosixSignal.SIGINT, PosixSignal.SIGTERM);
private static readonly FrozenSet<PosixSignal> SupportedPosixSignals = new HashSet<PosixSignal>(2) { PosixSignal.SIGINT, PosixSignal.SIGTERM }.ToFrozenSet();
private static bool IgnoreUnsupportedEnvironment;
private static bool InputCryptkeyManually;