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 all commits
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
  •  
  •  
  •  
6 changes: 0 additions & 6 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 Expand Up @@ -278,9 +275,6 @@ dotnet_diagnostic.IDE0300.severity = suggestion
# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = suggestion

# SA1400: Member should declare an access modifier
dotnet_diagnostic.SA1400.severity = suggestion

# SYSLIB1045: Convert to 'GeneratedRegexAttribute'.
dotnet_diagnostic.SYSLIB1045.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 @@ -44,8 +44,8 @@ public override void SetValue(object component, object value)
_setter.Target(_setter, component, value);
}

CallSite<Func<CallSite, object, object>> _getter;
CallSite<Action<CallSite, object, object>> _setter;
private CallSite<Func<CallSite, object, object>> _getter;
private CallSite<Action<CallSite, object, object>> _setter;
}

#endregion DynamicPropertyAccessorImpl
Expand Down Expand Up @@ -152,11 +152,11 @@ public static DynamicIndexerAccessor GetIndexerAccessor(int rank)
return _accessors[rank-1];
}

CallSite _getterCallSite, _setterCallSite;
MulticastDelegate _getterDelegate, _setterDelegate;
private CallSite _getterCallSite, _setterCallSite;
private MulticastDelegate _getterDelegate, _setterDelegate;

static DynamicIndexerAccessor[] _accessors = new DynamicIndexerAccessor[1];
static readonly object _lock = new object();
private static DynamicIndexerAccessor[] _accessors = new DynamicIndexerAccessor[1];
private static readonly object _lock = new object();
}

#endregion DynamicIndexerAccessor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ public DataTableToDataViewLink(DataTable dataTable, object target)
dataTable.Initialized += OnInitialized;
}

void OnInitialized(object sender, EventArgs e)
private void OnInitialized(object sender, EventArgs e)
{
}

object _target;
private object _target;
}

private class DataRowViewToRelatedViewLink
Expand All @@ -235,15 +235,15 @@ public DataRowViewToRelatedViewLink(DataRowView dataRowView, object target)
dataRowView.PropertyChanged += OnPropertyChanged;
}

void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
}

object _target;
private object _target;
}

static Type s_DataTablePropertyDescriptorType;
static Type s_DataRelationPropertyDescriptorType;
private static Type s_DataTablePropertyDescriptorType;
private static Type s_DataRelationPropertyDescriptorType;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int IComparer.Compare(object o1, object o2)

private SortDescriptionCollection _sortParameters;
private XmlNamespaceManager _namespaceManager;
CultureInfo _culture;
private CultureInfo _culture;
}
}

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
Loading