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 1 commit
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
Prev Previous commit
Next Next commit
Fix ReachFramework
  • Loading branch information
h3xds1nz committed Apr 3, 2025
commit d489ba0b5a7cd9a3b61ee22b6b3498183bb42de6
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ public static bool SetValue(string key, object val)
/// <param name="width"></param>
/// <param name="height"></param>
/// <returns></returns>
static internal double RasterizationCost(double width, double height)
internal static double RasterizationCost(double width, double height)
{
return 1024 + width / 96 * RasterizationDPI *
height / 96 * RasterizationDPI *
3;
}

static internal double RasterizationCost(double size)
internal static double RasterizationCost(double size)
{
return 1024 + size / 96 * RasterizationDPI * 3;
}
Expand Down Expand Up @@ -2596,10 +2596,10 @@ private BrushProxy BlendRadialGradientBrush(BrushProxy brushB)

#region Static Methods

static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black);
static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White);
private static BrushProxy _blackBrush = new BrushProxy(Brushes.Black);
private static BrushProxy _whiteBrush = new BrushProxy(Brushes.White);

static public bool IsOpaqueWhite(Brush brush)
public static bool IsOpaqueWhite(Brush brush)
{
SolidColorBrush sb = brush as SolidColorBrush;

Expand All @@ -2616,7 +2616,7 @@ static public bool IsOpaqueWhite(Brush brush)
return false;
}

static public bool IsOpaqueBlack(Brush brush)
public static bool IsOpaqueBlack(Brush brush)
{
SolidColorBrush sb = brush as SolidColorBrush;

Expand Down Expand Up @@ -3503,7 +3503,7 @@ public BrushTypes BrushType
}
}

static public BrushProxy EmptyBrush
public static BrushProxy EmptyBrush
{
get
{
Expand Down Expand Up @@ -3553,7 +3553,7 @@ static public BrushProxy EmptyBrush
private ArrayList _brushList;
private bool _opacityOnly;

static private BrushProxy s_EmptyBrush;
private static BrushProxy s_EmptyBrush;
#endregion
}

Expand Down Expand Up @@ -3939,7 +3939,7 @@ private bool AddStop(double offset, MyColor c)
return true;
}

static private MyColor InterpolateColor(double offset, double i0, MyColor c0, double i1, MyColor c1)
private static MyColor InterpolateColor(double offset, double i0, MyColor c0, double i1, MyColor c1)
{
double di = i1 - i0;

Expand Down Expand Up @@ -4099,7 +4099,7 @@ public int Steps

#region Private Methods

static private Geometry CreateRotatedRectangle(double x, double y, double w, double h, Matrix mat)
private static Geometry CreateRotatedRectangle(double x, double y, double w, double h, Matrix mat)
{
StreamGeometry geometry = new StreamGeometry();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ private static bool BlendCommands(PrimitiveInfo pi, PrimitiveInfo pj)
/// <param name="j">second command</param>
/// <param name="pj">command[j]</param>
/// <param name="disconnect">Disconnect (i,j) overlap/underlay relationship</param>
static private void SwitchCommands(List<PrimitiveInfo> commands, int i, PrimitiveInfo pi, int j, PrimitiveInfo pj, bool disconnect)
private static void SwitchCommands(List<PrimitiveInfo> commands, int i, PrimitiveInfo pi, int j, PrimitiveInfo pj, bool disconnect)
{
if ((pi != null) && (pj != null) && disconnect)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void Comment(string message)
/// </summary>
internal class MetroToGdiConverter : IMetroDrawingContext
{
static protected object s_TestingHook;
protected static object s_TestingHook;

protected MetroDevice0 m_Flattener;
protected ILegacyDevice m_GDIExporter;
Expand Down Expand Up @@ -751,7 +751,7 @@ private void DisposePrintTicketConverter()
/// Called before StartDocument to by-pass GDIExporter and send result to DrawingContext
/// </summary>
/// <param name="obj"></param>
static public void TestingHook(Object obj)
public static void TestingHook(Object obj)
{
if (obj != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal static string LeftPad(object obj, int len)
return s.PadLeft(len, ' ');
}

static internal void PrintPrimitive(PrimitiveInfo info, int index, bool verbose)
internal static void PrintPrimitive(PrimitiveInfo info, int index, bool verbose)
{
if (index < 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ internal static class Utility
/// <summary>
/// Apply transformation to Rect
/// </summary>
static public Rect TransformRect(Rect r, Matrix t)
public static Rect TransformRect(Rect r, Matrix t)
{
if (t.IsIdentity)
{
Expand Down Expand Up @@ -112,32 +112,32 @@ public static bool IsZero(double value)
return Math.Abs(value) < Epsilon;
}

static public bool AreClose(double v1, double v2)
public static bool AreClose(double v1, double v2)
{
return IsZero(v1 - v2);
}

static public bool AreClose(Point p1, Point p2)
public static bool AreClose(Point p1, Point p2)
{
return IsZero(p1.X - p2.X) && IsZero(p1.Y - p2.Y);
}

static public bool AreClose(Vector v1, Vector v2)
public static bool AreClose(Vector v1, Vector v2)
{
return IsZero(v1.X - v2.X) && IsZero(v2.Y - v2.Y);
}

static public bool AreClose(Size s1, Size s2)
public static bool AreClose(Size s1, Size s2)
{
return IsZero(s1.Width - s2.Width) && IsZero(s1.Height - s2.Height);
}

static public bool AreClose(Rect r1, Rect r2)
public static bool AreClose(Rect r1, Rect r2)
{
return AreClose(r1.TopLeft, r2.TopLeft) && AreClose(r1.BottomRight, r2.BottomRight);
}

static public bool IsMultipleOf(double v1, double v2)
public static bool IsMultipleOf(double v1, double v2)
{
if (IsZero(v2))
{
Expand All @@ -151,7 +151,7 @@ static public bool IsMultipleOf(double v1, double v2)
return (s >= 1) && IsZero(scale - s);
}

static public bool IsScaleTranslate(Matrix transform)
public static< 10000 /span> bool IsScaleTranslate(Matrix transform)
{
return IsZero(transform.M12) && IsZero(transform.M21);
}
Expand All @@ -160,7 +160,7 @@ static public bool IsScaleTranslate(Matrix transform)
// y' = m12 * x + m22 * y + dy
// When m11^2 + m12^2 = m21^2 + m22^2 and m11 * m21 + m12 * m22 = 0
// Distance between any two points will be scaled by a constant
static public bool HasUniformScale(Matrix mat, out double scale)
public static bool HasUniformScale(Matrix mat, out double scale)
{
scale = 1;

Expand Down Expand Up @@ -352,7 +352,7 @@ public static Matrix CreateMappingTransform(Rect r1, double width, double height
/// <summary>
/// Apply transformation to Geometry
/// </summary>
static public Geometry TransformGeometry(Geometry g, Matrix t)
public static Geometry TransformGeometry(Geometry g, Matrix t)
{
if (g == null)
{
Expand All @@ -374,7 +374,7 @@ static public Geometry TransformGeometry(Geometry g, Matrix t)
/// <summary>
/// Apply transformation to Geometry
/// </summary>
static public Geometry TransformGeometry(Geometry g, Transform t)
public static Geometry TransformGeometry(Geometry g, Transform t)
{
if (g == null)
{
Expand All @@ -393,7 +393,7 @@ static public Geometry TransformGeometry(Geometry g, Transform t)
return newg;
}

static public Geometry InverseTransformGeometry(Geometry g, Matrix mat)
public static Geometry InverseTransformGeometry(Geometry g, Matrix mat)
{
if ((g == null) || mat.IsIdentity)
{
Expand All @@ -414,7 +414,7 @@ static public Geometry InverseTransformGeometry(Geometry g, Matrix mat)
/// mat is used to transform geometry bounds to world space to test for
/// non-visible geometry.
/// </remarks>
static public bool IsEmpty(Geometry shape, Matrix mat)
public static bool IsEmpty(Geometry shape, Matrix mat)
{
if (shape == null)
{
Expand Down Expand Up @@ -443,7 +443,7 @@ static public bool IsEmpty(Geometry shape, Matrix mat)
return false;
}

static public PathGeometry GetAsPathGeometry(Geometry geo)
public static PathGeometry GetAsPathGeometry(Geometry geo)
{
PathGeometry pg = geo as PathGeometry;

Expand All @@ -455,7 +455,7 @@ static public PathGeometry GetAsPathGeometry(Geometry geo)
return pg;
}

static public bool IsRectangle(Geometry geometry)
public static bool IsRectangle(Geometry geometry)
{
if (geometry.Transform != null && !IsScaleTranslate(geometry.Transform.Value))
{
Expand Down Expand Up @@ -625,7 +625,7 @@ out isLineSegment
}


static public double GetGeometryCost(Geometry g)
public static double GetGeometryCost(Geometry g)
{
StreamGeometry sg = g as StreamGeometry;

Expand Down Expand Up @@ -686,7 +686,7 @@ out isLineSegment
/// <param name="one"></param>
/// <param name="two"></param>
/// <returns>True if Intersect(one, two) = two</returns>
static public bool FullyCovers(Geometry one, Geometry two)
public static bool FullyCovers(Geometry one, Geometry two)
{
Rect bounds1 = one.Bounds;
Rect bounds2 = two.Bounds;
Expand Down Expand Up @@ -720,7 +720,7 @@ static public bool FullyCovers(Geometry one, Geometry two)
return false;
}

static public bool Covers(Geometry one, Geometry two)
public static bool Covers(Geometry one, Geometry two)
{
Rect bounds1 = one.Bounds;
Rect bounds2 = two.Bounds;
Expand Down Expand Up @@ -751,7 +751,7 @@ static public bool Covers(Geometry one, Geometry two)
/// mat is used to estimate world-space size of the intersection, and return empty if
/// intersection result is too small to be visible.
/// </remarks>
static public Geometry Intersect(Geometry one, Geometry two, Matrix mat, out bool empty)
public static Geometry Intersect(Geometry one, Geometry two, Matrix mat, out bool empty)
{
empty = false;

Expand Down Expand Up @@ -801,7 +801,7 @@ static public Geometry Intersect(Geometry one, Geometry two, Matrix mat, out boo
/// mat is used to estimate world-space size of the intersection, and return empty if
/// intersection result is too small to be visible.
/// </remarks>
static public Geometry Exclude(Geometry one, Geometry two, Matrix mat)
public static Geometry Exclude(Geometry one, Geometry two, Matrix mat)
{
if ((one == null) || (two == null))
{
Expand All @@ -817,7 +817,7 @@ static public Geometry Exclude(Geometry one, Geometry two, Matrix mat)
/// <param name="clip"></param>
/// <param name="rect"></param>
/// <returns></returns>
static public bool Disjoint(Geometry clip, Rect rect)
public static bool Disjoint(Geometry clip, Rect rect)
{
// Null clip means no clipping
if (clip == null)
Expand Down Expand Up @@ -966,7 +966,7 @@ public static int GetPathPointCount(PathSegment segment)

private const double Tolerance_960_dpi = 0.1;

static private Geometry Combine(Geometry one, Geometry two, GeometryCombineMode mode, Matrix mat)
private static Geometry Combine(Geometry one, Geometry two, GeometryCombineMode mode, Matrix mat)
{
#if DEBUG
StopWatch.Start();
Expand Down Expand Up @@ -999,7 +999,7 @@ static private Geometry Combine(Geometry one, Geometry two, GeometryCombineMode
}
}

static private bool IsOnRectangle(Point start, Point p, Point q, int n)
private static bool IsOnRectangle(Point start, Point p, Point q, int n)
{
switch (n)
{
Expand Down Expand Up @@ -1137,7 +1137,7 @@ public static byte ColorToByte(float value)
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
static public Color BlendColor(Color x, Color y)
public static Color BlendColor(Color x, Color y)
{
if (Configuration.ForceAlphaOpaque)
{
Expand Down Expand Up @@ -1219,7 +1219,7 @@ private static Byte Div255(int val)
/// <param name="colorX"></param>
/// <param name="opacity"></param>
/// <param name="opacityOnly">Only use the alpha channel in the image</param>
static public void BlendOverColor(byte[] pixels, int count, Color colorX, double opacity, bool opacityOnly)
public static void BlendOverColor(byte[] pixels, int count, Color colorX, double opacity, bool opacityOnly)
{
/* if (Configuration.ForceAlphaOpaque)
{
Expand Down Expand Up @@ -1277,7 +1277,7 @@ static public void BlendOverColor(byte[] pixels, int count, Color colorX, double
/// <param name="colorY"></param>
/// <param name="opacity"></param>
/// <param name="opacityOnly">Only use the alpha channel in the image</param>
static public void BlendUnderColor(byte[] pixels, int count, Color colorY, double opacity, bool opacityOnly)
public static void BlendUnderColor(byte[] pixels, int count, Color colorY, double opacity, bool opacityOnly)
{
Byte b = colorY.A;
Byte yR = colorY.R;
Expand Down Expand Up @@ -1329,7 +1329,7 @@ static public void BlendUnderColor(byte[] pixels, int count, Color colorY, doubl
/// <param name="opacityOnlyB"></param>
/// <param name="count"></param>
/// <param name="pixelsC">Output pixel array</param>
static public void BlendPixels(byte[] pixelsA, bool opacityOnlyA, byte[] pixelsB, bool opacityOnlyB, int count, byte[] pixelsC)
public static void BlendPixels(byte[] pixelsA, bool opacityOnlyA, byte[] pixelsB, bool opacityOnlyB, int count, byte[] pixelsC)
{
int p = 0;

Expand Down Expand Up @@ -1378,7 +1378,7 @@ static public void BlendPixels(byte[] pixelsA, bool opacityOnlyA, byte[] pixelsB
/// <param name="clipWidth"></param>
/// <param name="clipHeight"></param>
/// <returns>Returns array of clipped pixels.</returns>
static public byte[] ClipPixels(byte[] pixels, int width, int height, int x0, int y0, int clipWidth, int clipHeight)
public static byte[] ClipPixels(byte[] pixels, int width, int height, int x0, int y0, int clipWidth, int clipHeight)
{
Debug.Assert(
(x0 >= 0) &&
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 @@ -441,7 +441,7 @@ private Dictionary<string, string> OptionalSignedParts
#region Private data
private PackageDigitalSignature _packageSignature;
private XpsDocument _package;
static private Dictionary<string, string> _optionalSignedTypes;
private static Dictionary<string, string> _optionalSignedTypes;
#endregion Private data
}

Expand Down
Loading
0