Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ dotnet_diagnostic.IDE0038.severity = silent
dotnet_diagnostic.IDE0039.severity = silent

# IDE0040: AddAccessibilityModifiers
dotnet_diagnostic.IDE0040.severity = silent
dotnet_diagnostic.IDE0040.severity = warning

# IDE0041: UseIsNullCheck
dotnet_diagnostic.IDE0041.severity = silent
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/PSConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ internal PSLevel GetLogLevel()
/// <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.
Expand Down
17 changes: 9 additions & 8 deletions src/System.Management.Automation/utils/tracing/SysLogProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -147,7 +148,7 @@ private static StringBuilder MessageBuilder
/// to ensure correct thread initialization.
/// </remarks>
[ThreadStatic]
static Guid? t_activity;
private static Guid? t_activity;

private static Guid Activity
{
Expand Down Expand Up @@ -275,7 +276,7 @@ private static void GetEventMessage(StringBuilder sb, PSEventId eventId, params
#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,
Expand Down Expand Up @@ -374,7 +375,7 @@ internal enum LogLevel : uint

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.
Expand Down
8 changes: 4 additions & 4 deletions test/tools/TestExe/TestExe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

namespace TestExe
{
class TestExe
internal class TestExe
{
static int Main(string[] args)
private static int Main(string[] args)
{
if (args.Length > 0)
{
Expand Down Expand Up @@ -44,7 +44,7 @@ static int Main(string[] args)
// <Summary>
// Echos back to stdout the arguments passed in
// </Summary>
static void EchoArgs(string[] args)
private static void EchoArgs(string[] args)
{
for (int i = 1; i < args.Length; i++)
{
Expand All @@ -56,7 +56,7 @@ static void EchoArgs(string[] args)
// First argument is the number of child processes to create which are instances of itself
// Processes automatically exit after 100 seconds
// </Summary>
static void CreateChildProcess(string[] args)
private static void CreateChildProcess(string[] args)
{
if (args.Length > 1)
{
Expand Down
4 changes: 2 additions & 2 deletions test/tools/TestService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

namespace TestService
{
static class Program
internal static class Program
{
static void Main()
private static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
Expand Down