Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[StyleCleanUp] Add missing accessibility modifiers on members (IDE0040) #10021

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
IDE0040 Part 1 with config removal
  • Loading branch information
h3xds1nz committed Jan 9, 2025
commit 7080c496388cb4ab43c4c41146728679546456c4
3 changes: 0 additions & 3 deletions src/Microsoft.DotNet.Wpf/src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,6 @@ dotnet_diagnostic.IDE0034.severity = suggestion
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = suggestion

# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = suggestion

# IDE0041: Use 'is null' check
dotnet_diagnostic.IDE0041.severity = suggestion

Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.DotNet.Wpf/src/Common/Graphics/exports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ internal sealed partial class Channel
/// <summary>
/// Primary channel.
/// </summary>
IntPtr _hChannel;
private IntPtr _hChannel;

private Channel _referenceChannel;
private bool _isSynchronous;
private bool _isOutOfBandChannel;

IntPtr _pConnection;
private IntPtr _pConnection;

/// <summary>
/// Creates a channel and associates it with channel group (partition).
Expand Down
40 changes: 20 additions & 20 deletions src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_render.cs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ internal enum ChildType
eChildLast = 0x2
};

enum MILResourceType
internal enum MILResourceType
{
eMILResourceVideo = 0,
eMILCOB = 1,
Expand All @@ -594,7 +594,7 @@ enum MILResourceType
eMILResourceLast = 5
};

enum MILAVInstructionType
internal enum MILAVInstructionType
{
eAVPlay = 0,
eAVStop,
Expand Down Expand Up @@ -658,61 +658,61 @@ internal enum WICComponentType
[StructLayout(LayoutKind.Sequential)]
internal struct WICBitmapPattern
{
Int64 Offset;
UInt32 Length;
IntPtr Pattern;
IntPtr Mask;
private Int64 Offset;
private UInt32 Length;
private IntPtr Pattern;
private IntPtr Mask;
}

[StructLayout(LayoutKind.Sequential)]
internal struct MILBitmapItem
{
uint Size;
IntPtr Desc;
uint DescSize;
IntPtr Data;
uint DataSize;
uint Cookie;
private uint Size;
private IntPtr Desc;
private uint DescSize;
private IntPtr Data;
private uint DataSize;
private uint Cookie;
};

[StructLayout(LayoutKind.Sequential)]
internal struct BitmapTransformCaps
{
// Size of this structure.

int nSize;
private int nSize;

// minimum number of inputs required.

int cMinInputs;
private int cMinInputs;

// maximum number of inputs that will be processed.

int cMaxInputs;
private int cMaxInputs;

// Set to false requires all the inputs and the
// output to have the same pixel format determined
// by calling IsPixelFormatSupported() for any
// index. Set to true allows different input/output
// pixel formats.

[MarshalAs(UnmanagedType.Bool)] bool fSupportMultiFormat;
[MarshalAs(UnmanagedType.Bool)] private bool fSupportMultiFormat;

// Supports auxilliary data out.

[MarshalAs(UnmanagedType.Bool)] bool fAuxiliaryData;
[MarshalAs(UnmanagedType.Bool)] private bool fAuxiliaryData;

// TRUE if the effect supports multiple output

[MarshalAs(UnmanagedType.Bool)] bool fSupportMultiOutput;
[MarshalAs(UnmanagedType.Bool)] private bool fSupportMultiOutput;

// TRUE if the effect can provide output band by band

[MarshalAs(UnmanagedType.Bool)] bool fSupportBanding;
[MarshalAs(UnmanagedType.Bool)] private bool fSupportBanding;

// TRUE if the effect supports multi-resolution

[MarshalAs(UnmanagedType.Bool)] bool fSupportMultiResolution;
[MarshalAs(UnmanagedType.Bool)] private bool fSupportMultiResolution;
};

[StructLayout(LayoutKind.Sequential)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,11 @@ private SourceFileInfo OnSourceFileResolve(FileUnit file)
return sourceFileInfo;
}

#endregion CompileUnit
#endregion CompileUnit

#region ErrorHandling
#region ErrorHandling

static void ThrowCompilerException(string id)
private static void ThrowCompilerException(string id)
{
string message = SR.GetResourceString(id);
ThrowCompilerExceptionImpl(message);
Expand All @@ -740,13 +740,13 @@ internal static void ThrowCompilerException(string id, string value1, string val
ThrowCompilerExceptionImpl(message);
}

static void ThrowCompilerException(string id, string value1, string value2, string value3, string value4)
private static void ThrowCompilerException(string id, string value1, string value2, string value3, string value4)
{
string message = SR.Format(SR.GetResourceString(id), value1, value2, value3, value4);
ThrowCompilerExceptionImpl(message);
}

static void ThrowCompilerExceptionImpl(string message)
private static void ThrowCompilerExceptionImpl(string message)
{
Exception compilerException = new Exception(message);
throw compilerException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ internal override bool CanResolveLocalAssemblies()
return _pass2;
}

bool ProcessedRootElement
private bool ProcessedRootElement
{
get { return _processedRootElement; }
set { _processedRootElement = value; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace MS.Internal
{
internal static class VersionHelper
{
static readonly Version NullVersion = new Version(0, 0, 0, 0);
private static readonly Version NullVersion = new Version(0, 0, 0, 0);

/// <summary>
/// Parses a version string of the form "major [ '.' minor [ '.' build [ '.' revision ] ] ]".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ private static void ReplaceImplicitImports(XmlDocument xmlProjectDoc)
// Creates an XmlNode that contains an Import Project element
//
// <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
static XmlNode CreateImportProjectSdkNode(XmlDocument xmlProjectDoc, string projectAttributeValue, SdkReference sdkReference)
private static XmlNode CreateImportProjectSdkNode(XmlDocument xmlProjectDoc, string projectAttributeValue, SdkReference sdkReference)
{
XmlNode nodeImport = xmlProjectDoc.CreateElement("Import", xmlProjectDoc.DocumentElement.NamespaceURI);
XmlAttribute projectAttribute = xmlProjectDoc.CreateAttribute("Project");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace MS.Internal.AppModel
{
static class CookieHandler
internal static class CookieHandler
{
internal static void HandleWebRequest(WebRequest request)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ private Stream HandleWebSource(bool onlyNeedContentType)

#region Private Members

Uri _absoluteLocation = null;
ContentType _contentType = MS.Internal.ContentType.Empty;
Stream _cacheStream = null;
private Uri _absoluteLocation = null;
private ContentType _contentType = MS.Internal.ContentType.Empty;
private Stream _cacheStream = null;
private Object _globalLock = new Object();

#endregion Private Members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ internal sealed class FontFaceLayoutInfo
private byte[] _gpos;
private byte[] _gdef;

Text.TextInterface.Font _font;
private Text.TextInterface.Font _font;

ushort _blankGlyphIndex;
private ushort _blankGlyphIndex;


//------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ static internal partial class TraceRoutedEvent
delegate() { return PresentationTraceSources.RoutedEventSource; },
delegate() { PresentationTraceSources._RoutedEventSource = null; }
);

static AvTraceDetails _RaiseEvent;
private static AvTraceDetails _RaiseEvent;
static public AvTraceDetails RaiseEvent
{
get
Expand All @@ -28,7 +27,7 @@ static public AvTraceDetails RaiseEvent
}
}

static AvTraceDetails _ReRaiseEventAs;
private static AvTraceDetails _ReRaiseEventAs;
static public AvTraceDetails ReRaiseEventAs
{
get
Expand All @@ -42,7 +41,7 @@ static public AvTraceDetails ReRaiseEventAs
}
}

static AvTraceDetails _HandleEvent;
private static AvTraceDetails _HandleEvent;
static public AvTraceDetails HandleEvent
{
get
Expand All @@ -56,7 +55,7 @@ static public AvTraceDetails HandleEvent
}
}

static AvTraceDetails _InvokeHandlers;
private static AvTraceDetails _InvokeHandlers;
static public AvTraceDetails InvokeHandlers
{
get
Expand Down Expand Up @@ -141,8 +140,7 @@ static internal partial class TraceAnimation
delegate() { return PresentationTraceSources.AnimationSource; },
delegate() { PresentationTraceSources._AnimationSource = null; }
);

static AvTraceDetails _StoryboardBegin;
private static AvTraceDetails _StoryboardBegin;
static public AvTraceDetails StoryboardBegin
{
get
Expand All @@ -156,7 +154,7 @@ static public AvTraceDetails StoryboardBegin
}
}

static AvTraceDetails _StoryboardPause;
private static AvTraceDetails _StoryboardPause;
static public AvTraceDetails StoryboardPause
{
get
Expand All @@ -170,7 +168,7 @@ static public AvTraceDetails StoryboardPause
}
}

static AvTraceDetails _StoryboardRemove;
private static AvTraceDetails _StoryboardRemove;
static public AvTraceDetails StoryboardRemove
{
get
Expand All @@ -184,7 +182,7 @@ static public AvTraceDetails StoryboardRemove
}
}

static AvTraceDetails _StoryboardResume;
private static AvTraceDetails _StoryboardResume;
static public AvTraceDetails StoryboardResume
{
get
Expand All @@ -198,7 +196,7 @@ static public AvTraceDetails StoryboardResume
}
}

static AvTraceDetails _StoryboardStop;
private static AvTraceDetails _StoryboardStop;
static public AvTraceDetails StoryboardStop
{
get
Expand All @@ -212,7 +210,7 @@ static public AvTraceDetails StoryboardStop
}
}

static AvTraceDetails _StoryboardNotApplied;
private static AvTraceDetails _StoryboardNotApplied;
static public AvTraceDetails StoryboardNotApplied
{
get
Expand All @@ -226,7 +224,7 @@ static public AvTraceDetails StoryboardNotApplied
}
}

static AvTraceDetails _AnimateStorageValidationFailed;
private static AvTraceDetails _AnimateStorageValidationFailed;
static public AvTraceDetails AnimateStorageValidationFailed
{
get
Expand All @@ -240,7 +238,7 @@ static public AvTraceDetails AnimateStorageValidationFailed
}
}

static AvTraceDetails _AnimateStorageValidationNoLongerFailing;
private static AvTraceDetails _AnimateStorageValidationNoLongerFailing;
static public AvTraceDetails AnimateStorageValidationNoLongerFailing
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1269,11 +1269,11 @@ private void FreeTempFile()
//------------------------------------------------------
private enum ReadEvent { FullDownloadReadEvent = 0, ByteRangeReadEvent = 1, MaxReadEventEnum };

Uri _uri; // uri we are resolving
private Uri _uri; // uri we are resolving

WebRequest _originalRequest; // Proxy member is Critical
Stream _tempFileStream; // local temp stream we are writing to and reading from - protected by _tempFileMutex
long _position; // our "logical stream position"
private WebRequest _originalRequest; // Proxy member is Critical
private Stream _tempFileStream; // local temp stream we are writing to and reading from - protected by _tempFileMutex
private long _position; // our "logical stream position"

// syncObject - provides mutually-exclusive access control to the following entities:
// 1. _highWaterMark - this is actually queried outside of a lock in get_Length, but this is safe as a stale value only impacts perf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ cusp detection
// Parameters governing the cusp detection algorithm
// Distance between probes for curvature checking
private double _span = 3; // Default span
struct CDataPoint

private struct CDataPoint
{
public Point Point; // Point (coordinates are double)
public int Index; // Index into the original array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ private static MS.Win32.Recognizer.RecognizerSafeHandle RecognizerHandleSingleto
}
}

enum RECO_TYPE : ushort
private enum RECO_TYPE : ushort
{
RECO_TYPE_WSTRING = 0,
RECO_TYPE_WCHAR = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static KnownTagCache.KnownTagIndex FindKnownTag(Guid guid)
/// </summary>
/// <param name="guid"></param>
/// <returns></returns>
KnownTagCache.KnownTagIndex FindCustomTag(Guid guid)
private KnownTagCache.KnownTagIndex FindCustomTag(Guid guid)
{
int i;

Expand Down Expand Up @@ -107,7 +107,7 @@ public KnownTagCache.KnownTagIndex FindTag(Guid guid, bool bFindInKnownListFirst
/// </summary>
/// <param name="tag"></param>
/// <returns></returns>
static Guid FindKnownGuid(KnownTagCache.KnownTagIndex tag)
private static Guid FindKnownGuid(KnownTagCache.KnownTagIndex tag)
{
if (tag < KnownIdCache.KnownGuidBaseIndex)
{
Expand All @@ -131,7 +131,7 @@ static Guid FindKnownGuid(KnownTagCache.KnownTagIndex tag)
/// </summary>
/// <param name="tag"></param>
/// <returns></returns>
Guid FindCustomGuid(KnownTagCache.KnownTagIndex tag)
private Guid FindCustomGuid(KnownTagCache.KnownTagIndex tag)
{
if ((int)tag < (int)KnownIdCache.CustomGuidBaseIndex)
{
Expand Down
Loading