mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Enable IDE0040: AddAccessibilityModifiers (#13962)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040
This commit is contained in:
@@ -290,12 +290,12 @@ namespace System.Management.Automation.Configuration
|
||||
/// <summary>
|
||||
/// The supported separator characters for listing channels and keywords in configuration.
|
||||
/// </summary>
|
||||
static readonly char[] s_valueSeparators = new char[] {' ', ',', '|'};
|
||||
private static readonly char[] s_valueSeparators = new char[] {' ', ',', '|'};
|
||||
|
||||
/// <summary>
|
||||
/// Provides a string name to indicate the default for a configuration setting.
|
||||
/// </summary>
|
||||
const string LogDefaultValue = "default";
|
||||
private const string LogDefaultValue = "default";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the bitmask of the PSChannel values to log.
|
||||
|
||||
@@ -80,11 +80,12 @@ namespace System.Management.Automation.Tracing
|
||||
internal class SysLogProvider
|
||||
{
|
||||
// Ensure the string pointer is not garbage collected.
|
||||
static IntPtr _nativeSyslogIdent = IntPtr.Zero;
|
||||
static readonly NativeMethods.SysLogPriority _facility = NativeMethods.SysLogPriority.Local0;
|
||||
readonly byte _channelFilter;
|
||||
readonly ulong _keywordFilter;
|
||||
readonly byte _levelFilter;
|
||||
private static IntPtr _nativeSyslogIdent = IntPtr.Zero;
|
||||
private static readonly NativeMethods.SysLogPriority _facility = NativeMethods.SysLogPriority.Local0;
|
||||
|
||||
private readonly byte _channelFilter;
|
||||
private readonly ulong _keywordFilter;
|
||||
private readonly byte _levelFilter;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of this class.
|
||||
@@ -147,7 +148,7 @@ namespace System.Management.Automation.Tracing
|
||||
/// to ensure correct thread initialization.
|
||||
/// </remarks>
|
||||
[ThreadStatic]
|
||||
static Guid? t_activity;
|
||||
private static Guid? t_activity;
|
||||
|
||||
private static Guid Activity
|
||||
{
|
||||
@@ -275,7 +276,7 @@ namespace System.Management.Automation.Tracing
|
||||
#region logging
|
||||
|
||||
// maps a LogLevel to an associated SysLogPriority.
|
||||
static readonly NativeMethods.SysLogPriority[] _levels =
|
||||
private static readonly NativeMethods.SysLogPriority[] _levels =
|
||||
{
|
||||
NativeMethods.SysLogPriority.Info,
|
||||
NativeMethods.SysLogPriority.Critical,
|
||||
@@ -374,7 +375,7 @@ namespace System.Management.Automation.Tracing
|
||||
|
||||
internal static class NativeMethods
|
||||
{
|
||||
const string libpslnative = "libpsl-native";
|
||||
private const string libpslnative = "libpsl-native";
|
||||
/// <summary>
|
||||
/// Write a message to the system logger, which in turn writes the message to the system console, log files, etc.
|
||||
/// See man 3 syslog for more info.
|
||||
|
||||
Reference in New Issue
Block a user