Skip to content

Commit 23deb41

Browse files
authored
1 parent ed595c0 commit 23deb41

5 files changed

Lines changed: 18 additions & 17 deletions

File tree

.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ dotnet_diagnostic.IDE0038.severity = silent
845845
dotnet_diagnostic.IDE0039.severity = silent
846846

847847
# IDE0040: AddAccessibilityModifiers
848-
dotnet_diagnostic.IDE0040.severity = silent
848+
dotnet_diagnostic.IDE0040.severity = warning
849849

850850
# IDE0041: UseIsNullCheck
851851
dotnet_diagnostic.IDE0041.severity = silent

src/System.Management.Automation/engine/PSConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ internal PSLevel GetLogLevel()
290290
/// <summary>
291291
/// The supported separator characters for listing channels and keywords in configuration.
292292
/// </summary>
293-
static readonly char[] s_valueSeparators = new char[] {' ', ',', '|'};
293+
private static readonly char[] s_valueSeparators = new char[] {' ', ',', '|'};
294294

295295
/// <summary>
296296
/// Provides a string name to indicate the default for a configuration setting.
297297
/// </summary>
298-
const string LogDefaultValue = "default";
298+
private const string LogDefaultValue = "default";
299299

300300
/// <summary>
301301
/// Gets the bitmask of the PSChannel values to log.

src/System.Management.Automation/utils/tracing/SysLogProvider.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ namespace System.Management.Automation.Tracing
8080
internal class SysLogProvider
8181
{
8282
// Ensure the string pointer is not garbage collected.
83-
static IntPtr _nativeSyslogIdent = IntPtr.Zero;
84-
static readonly NativeMethods.SysLogPriority _facility = NativeMethods.SysLogPriority.Local0;
85-
readonly byte _channelFilter;
86-
readonly ulong _keywordFilter;
87-
readonly byte _levelFilter;
83+
private static IntPtr _nativeSyslogIdent = IntPtr.Zero;
84+
private static readonly NativeMethods.SysLogPriority _facility = NativeMethods.SysLogPriority.Local0;
85+
86+
private readonly byte _channelFilter;
87+
private readonly ulong _keywordFilter;
88+
private readonly byte _levelFilter;
8889

8990
/// <summary>
9091
/// Initializes a new instance of this class.
@@ -147,7 +148,7 @@ private static StringBuilder MessageBuilder
147148
/// to ensure correct thread initialization.
148149
/// </remarks>
149150
[ThreadStatic]
150-
static Guid? t_activity;
151+
private static Guid? t_activity;
151152

152153
private static Guid Activity
153154
{
@@ -275,7 +276,7 @@ private static void GetEventMessage(StringBuilder sb, PSEventId eventId, params
275276
#region logging
276277

277278
// maps a LogLevel to an associated SysLogPriority.
278-
static readonly NativeMethods.SysLogPriority[] _levels =
279+
private static readonly NativeMethods.SysLogPriority[] _levels =
279280
{
280281
NativeMethods.SysLogPriority.Info,
281282
NativeMethods.SysLogPriority.Critical,
@@ -374,7 +375,7 @@ internal enum LogLevel : uint
374375

375376
internal static class NativeMethods
376377
{
377-
const string libpslnative = "libpsl-native";
378+
private const string libpslnative = "libpsl-native";
378379
/// <summary>
379380
/// Write a message to the system logger, which in turn writes the message to the system console, log files, etc.
380381
/// See man 3 syslog for more info.

test/tools/TestExe/TestExe.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace TestExe
99
{
10-
class TestExe
10+
internal class TestExe
1111
{
12-
static int Main(string[] args)
12+
private static int Main(string[] args)
1313
{
1414
if (args.Length > 0)
1515
{
@@ -44,7 +44,7 @@ static int Main(string[] args)
4444
// <Summary>
4545
// Echos back to stdout the arguments passed in
4646
// </Summary>
47-
static void EchoArgs(string[] args)
47+
private static void EchoArgs(string[] args)
4848
{
4949
for (int i = 1; i < args.Length; i++)
5050
{
@@ -56,7 +56,7 @@ static void EchoArgs(string[] args)
5656
// First argument is the number of child processes to create which are instances of itself
5757
// Processes automatically exit after 100 seconds
5858
// </Summary>
59-
static void CreateChildProcess(string[] args)
59+
private static void CreateChildProcess(string[] args)
6060
{
6161
if (args.Length > 1)
6262
{

test/tools/TestService/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
namespace TestService
77
{
8-
static class Program
8+
internal static class Program
99
{
10-
static void Main()
10+
private static void Main()
1111
{
1212
ServiceBase[] ServicesToRun;
1313
ServicesToRun = new ServiceBase[]

0 commit comments

Comments
 (0)