8000 [StyleCleanUp] Order modifiers on members/types (IDE0036) by h3xds1nz · Pull Request #10601 · dotnet/wpf · GitHub
[go: up one dir, main page]

Skip to content

[StyleCleanUp] Order modifiers on members/types (IDE0036) #10601

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

Merged
merged 9 commits into from
Apr 3, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 17 additions & 17 deletions eng/WpfArcadeSdk/tools/CodeGen/AvTrace/AvTraceMessages.tt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ namespace MS.Internal
string name = source.Attribute("Name").Value;
string traceClassName = source.Attribute("TraceNameOverride")?.Value ?? $"Trace{name}";
#>
static internal partial class <#= traceClassName #>
internal static partial class <#= traceClassName #>
{
static private AvTrace _avTrace = new AvTrace(
private static AvTrace _avTrace = new AvTrace(
delegate() { return PresentationTraceSources.<#=name#>Source; },
delegate() { PresentationTraceSources._<#=name#>Source = null; }
);
Expand All @@ -45,7 +45,7 @@ namespace MS.Internal

static AvTraceDetails _<#=traceName#>;
<# if (IsFormattedTraceMessage(traceDetails)) { #>
static public AvTraceDetails <#= traceName #>(params object[] args)
public static AvTraceDetails <#= traceName #>(params object[] args)
{
if ( _<#=traceName#> == null )
{
Expand All @@ -54,7 +54,7 @@ namespace MS.Internal
return new AvTraceFormat(_<#= traceName #>, args);
}
<# } else { #>
static public AvTraceDetails <#= traceName #>
public static AvTraceDetails <#= traceName #>
{
get
{
Expand All @@ -70,66 +70,66 @@ namespace MS.Internal
<# } #>

/// <summary> Send a single trace output </summary>
static public void Trace( TraceEventType type, AvTraceDetails traceDetails, params object[] parameters )
public static void Trace( TraceEventType type, AvTraceDetails traceDetails, params object[] parameters )
{
_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, parameters );
}

/// <summary> These help delay allocation of object array </summary>
static public void Trace( TraceEventType type, AvTraceDetails traceDetails )
public static void Trace( TraceEventType type, AvTraceDetails traceDetails )
{
_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
}
static public void Trace( TraceEventType type, AvTraceDetails traceDetails, object p1 )
public static void Trace( TraceEventType type, AvTraceDetails traceDetails, object p1 )
{
_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, new object[] { p1 } );
}
static public void Trace( TraceEventType type, AvTraceDetails traceDetails, object p1, object p2 )
public static void Trace( TraceEventType type, AvTraceDetails traceDetails, object p1, object p2 )
{
_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, new object[] { p1, p2 } );
}
static public void Trace( TraceEventType type, AvTraceDetails traceDetails, object p1, object p2, object p3 )
public static void Trace( TraceEventType type, AvTraceDetails traceDetails, object p1, object p2, object p3 )
{
_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, new object[] { p1, p2, p3 } );
}

/// <summary> Send a singleton "activity" trace (really, this sends the same trace as both a Start and a Stop) </summary>
static public void TraceActivityItem( AvTraceDetails traceDetails, params Object[] parameters )
public static void TraceActivityItem( AvTraceDetails traceDetails, params Object[] parameters )
{
_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, parameters );
}

/// <summary> These help delay allocation of object array </summary>
static public void TraceActivityItem( AvTraceDetails traceDetails )
public static void TraceActivityItem( AvTraceDetails traceDetails )
{
_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
}
static public void TraceActivityItem( AvTraceDetails traceDetails, object p1 )
public static void TraceActivityItem( AvTraceDetails traceDetails, object p1 )
{
_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, new object[] { p1 } );
}
static public void TraceActivityItem( AvTraceDetails traceDetails, object p1, object p2 )
public static void TraceActivityItem( AvTraceDetails traceDetails, object p1, object p2 )
{
_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, new object[] { p1, p2 } );
}
static public void TraceActivityItem( AvTraceDetails traceDetails, object p1, object p2, object p3 )
public static void TraceActivityItem( AvTraceDetails traceDetails, object p1, object p2, object p3 )
{
_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, new object[] { p1, p2, p3 } );
}

static public bool IsEnabled
public static bool IsEnabled
{
get { return _avTrace != null && _avTrace.IsEnabled; }
}

/// <summary> Is there a Tracesource? (See comment on AvTrace.IsEnabledOverride.) </summary>
static public bool IsEnabledOverride
public static bool IsEnabledOverride
{
get { return _avTrace.IsEnabledOverride; }
}

/// <summary> Re-read the configuration for this trace source </summary>
static public void Refresh()
public static void Refresh()
{
_avTrace.Refresh();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7708,9 +7708,9 @@ public static void SetVirtualizationMode(System.Windows.DependencyObject element
public partial class VirtualizingStackPanel : System.Windows.Controls.VirtualizingPanel, System.Windows.Controls.Primitives.IScrollInfo
{
public static readonly System.Windows.RoutedEvent CleanUpVirtualizedItemEvent;
public static readonly new System.Windows.DependencyProperty IsVirtualizingProperty;
public static new readonly System.Windows.DependencyProperty IsVirtualizingProperty;
public static readonly System.Windows.DependencyProperty OrientationProperty;
public static readonly new System.Windows.DependencyProperty VirtualizationModeProperty;
public static new readonly System.Windows.DependencyProperty VirtualizationModeProperty;
public VirtualizingStackPanel() { }
protected override bool CanHierarchicallyScrollAndVirtualizeCore { get { throw null; } }
[System.ComponentModel.DefaultValueAttribute(false)]
Expand Down
3 changes: 0 additions & 3 deletions src/Microsoft.DotNet.Wpf/src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ dotnet_diagnostic.IDE0005.severity = suggestion
# IDE0034: Simplify 'default' expression
dotnet_diagnostic.IDE0034.severity = suggestion

# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = suggestion

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

Expand Down
22 changes: 11 additions & 11 deletions src/Microsoft.DotNet.Wpf/src/Common/Graphics/exports.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//
Expand Down Expand Up @@ -150,41 +150,41 @@ internal static extern int WgxConnection_SameThreadPresent(
internal static extern int MilChannel_GetMarshalType(IntPtr channelHandle, out ChannelMarshalType marshalType);

[DllImport (DllImport.MilCore, EntryPoint = "MilResource_SendCommand")]//CASRemoval:
unsafe internal static extern int MilResource_SendCommand(
internal static extern unsafe int MilResource_SendCommand(
byte *pbData,
uint cbSize,
bool sendInSeparateBatch,
IntPtr pChannel);

[DllImport (DllImport.MilCore, EntryPoint = "MilChannel_BeginCommand")]//CASRemoval:
unsafe internal static extern int MilChannel_BeginCommand(
internal static extern unsafe int MilChannel_BeginCommand(
IntPtr pChannel,
byte *pbData,
uint cbSize,
uint cbExtra
);

[DllImport (DllImport.MilCore, EntryPoint = "MilChannel_AppendCommandData")]//CASRemoval:
unsafe internal static extern int MilChannel_AppendCommandData(
internal static extern unsafe int MilChannel_AppendCommandData(
IntPtr pChannel,
byte *pbData,
uint cbSize
);

[DllImport (DllImport.MilCore, EntryPoint = "MilChannel_EndCommand")]//CASRemoval:
unsafe internal static extern int MilChannel_EndCommand(
internal static extern unsafe int MilChannel_EndCommand(
IntPtr pChannel);

[DllImport (DllImport.MilCore, EntryPoint = "MilResource_SendCommandMedia")]//CASRemoval:
unsafe internal static extern int MilResource_SendCommandMedia(
internal static extern unsafe int MilResource_SendCommandMedia(
ResourceHandle handle,
SafeMediaHandle pMedia,
IntPtr pChannel,
bool notifyUceDirect
);

[DllImport (DllImport.MilCore, EntryPoint = "MilResource_SendCommandBitmapSource")]//CASRemoval:
unsafe internal static extern int MilResource_SendCommandBitmapSource(
internal static extern unsafe int MilResource_SendCommandBitmapSource(
ResourceHandle handle,
BitmapSourceSafeMILHandle /* IWICBitmapSource */ pBitmapSource,
IntPtr pChannel);
Expand Down Expand Up @@ -619,7 +619,7 @@ internal bool IsOutOfBandChannel
/// <summary>
/// SendCommand sends a command struct through the composition thread.
/// </summary>
unsafe internal void SendCommand(
internal unsafe void SendCommand(
byte *pCommandData,
int cSize)
{
Expand All @@ -632,7 +632,7 @@ unsafe internal void SendCommand(
/// current open batch, or whether it will be added to a new and separate batch
/// which is then immediately closed, leaving the current batch untouched.
/// </summary>
unsafe internal void SendCommand(
internal unsafe void SendCommand(
byte *pCommandData,
int cSize,
bool sendInSeparateBatch)
Expand Down Expand Up @@ -668,7 +668,7 @@ unsafe internal void SendCommand(
/// <summary>
/// BeginCommand opens a command on a channel
/// </summary>
unsafe internal void BeginCommand(
internal unsafe void BeginCommand(
byte *pbCommandData,
int cbSize,
int cbExtra)
Expand Down Expand Up @@ -705,7 +705,7 @@ unsafe internal void BeginCommand(
/// <summary>
9E88 /// AppendCommandData appends data to an open command on a channel
/// </summary>
unsafe internal void AppendCommandData(
internal unsafe void AppendCommandData(
byte *pbCommandData,
int cbSize)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.InteropServices;
Expand Down Expand Up @@ -910,15 +910,15 @@ internal MilRectD(double left, double top, double right, double bottom)
_bottom = bottom;
}

static internal MilRectD Empty
internal static MilRectD Empty
{
get
{
return new MilRectD(0,0,0,0);
}
}

static internal MilRectD NaN
internal static MilRectD NaN
{
get
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


Expand Down Expand Up @@ -85,7 +85,7 @@ public override bool IsInvalid
}
}

override protected bool ReleaseHandle()
protected override bool ReleaseHandle()
{
Debug.Assert(handle != IntPtr.Zero);
return (MS.Internal.HRESULT.Succeeded(MS.Win32.Recognizer.UnsafeNativeMethods.DestroyRecognizer(handle)));
Expand Down Expand Up @@ -120,7 +120,7 @@ public override bool IsInvalid
}
}

override protected bool ReleaseHandle()
protected override bool ReleaseHandle()
{
//Note: It is not an error to have already called DestroyRecognizer
//which makes _recognizerHandle.IsInvalid == true before calling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//
Expand Down Expand Up @@ -42,7 +42,7 @@ static CustomCredentialPolicy()
_initialized = false;
}

static internal void EnsureCustomCredentialPolicy()
internal static void EnsureCustomCredentialPolicy()
{
if (!_initialized)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ private static void NotifySources()
}

private static Dictionary<int, EventInfo> _eventsTable; // key=event id, data=listener count
private readonly static object _lock = new object();
private static readonly object _lock = new object();
}
}

5DE8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Description: TextRange provider wrapper for WCP
Expand Down Expand Up @@ -165,7 +165,7 @@ public IRawElementProviderSimple[] GetChildren()
#region Internal Methods

// Wrap arguments that are being returned, assuming they're not null or already wrapped.
static internal ITextRangeProvider WrapArgument(ITextRangeProvider argument, AutomationPeer peer)
internal static ITextRangeProvider WrapArgument(ITextRangeProvider argument, AutomationPeer peer)
{
if (argument == null)
return null;
Expand All @@ -176,7 +176,7 @@ static internal ITextRangeProvider WrapArgument(ITextRangeProvider argument, Aut
return new TextRangeProviderWrapper(peer, argument);
}

static internal ITextRangeProvider [] WrapArgument(ITextRangeProvider [] argument, AutomationPeer peer)
internal static ITextRangeProvider [] WrapArgument(ITextRangeProvider [] argument, AutomationPeer peer)
{
if (argument == null)
return null;
Expand All @@ -193,7 +193,7 @@ static internal ITextRangeProvider [] WrapArgument(ITextRangeProvider [] argumen
}

// Remove the wrapper from the argument if a wrapper exists
static internal ITextRangeProvider UnwrapArgument(ITextRangeProvider argument)
internal static ITextRangeProvider UnwrapArgument(ITextRangeProvider argument)
{
if (argument is TextRangeProviderWrapper)
{
Expand Down
Loading
0