mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Fix enum naming warnings
This commit is contained in:
@@ -341,6 +341,8 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=API/@EntryIndexedValue">API</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ARGB/@EntryIndexedValue">ARGB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BPM/@EntryIndexedValue">BPM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FBO/@EntryIndexedValue">FBO</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CCL/@EntryIndexedValue">CCL</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GC/@EntryIndexedValue">GC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GL/@EntryIndexedValue">GL</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GLSL/@EntryIndexedValue">GLSL</s:String>
|
||||
@@ -355,6 +357,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IOSGL/@EntryIndexedValue">IOSGL</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IPC/@EntryIndexedValue">IPC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IQ/@EntryIndexedValue">IQ</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JIT/@EntryIndexedValue">JIT</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LTRB/@EntryIndexedValue">LTRB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD5</s:String>
|
||||
|
||||
@@ -339,9 +339,9 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
{
|
||||
Child = new TestKeyBindingReceptor
|
||||
{
|
||||
Pressed = a => pressedReceived = a == TestAction.ActionAB,
|
||||
Repeated = a => repeatedReceived = a == TestAction.ActionAB,
|
||||
Released = a => releasedReceived = a == TestAction.ActionAB,
|
||||
Pressed = a => pressedReceived = a == TestAction.ActionAb,
|
||||
Repeated = a => repeatedReceived = a == TestAction.ActionAb,
|
||||
Released = a => releasedReceived = a == TestAction.ActionAb,
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -500,7 +500,7 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
public override IEnumerable<IKeyBinding> DefaultKeyBindings => new IKeyBinding[]
|
||||
{
|
||||
new KeyBinding(InputKey.A, TestAction.ActionA),
|
||||
new KeyBinding(new KeyCombination(InputKey.A, InputKey.B), TestAction.ActionAB),
|
||||
new KeyBinding(new KeyCombination(InputKey.A, InputKey.B), TestAction.ActionAb),
|
||||
new KeyBinding(InputKey.Enter, TestAction.ActionEnter),
|
||||
new KeyBinding(InputKey.Control, TestAction.ActionControl),
|
||||
new KeyBinding(InputKey.ExtraMouseButton4, TestAction.ActionMouse4),
|
||||
@@ -529,7 +529,7 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
private enum TestAction
|
||||
{
|
||||
ActionA,
|
||||
ActionAB,
|
||||
ActionAb,
|
||||
ActionEnter,
|
||||
ActionControl,
|
||||
ActionMouse4,
|
||||
|
||||
@@ -187,19 +187,19 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
checkReleased(TestAction.S, 1, 0, 1, 1, 1);
|
||||
|
||||
toggleKey(Key.D);
|
||||
checkPressed(TestAction.D_or_F, 1, 1, 1, 1, 1);
|
||||
checkPressed(TestAction.DOrF, 1, 1, 1, 1, 1);
|
||||
toggleKey(Key.F);
|
||||
check(TestAction.D_or_F, new CheckConditions(none, 1, 1), new CheckConditions(noneExact, 0, 1), new CheckConditions(noneModifiers, 1, 1), new CheckConditions(unique, 0, 0), new CheckConditions(all, 1, 0));
|
||||
check(TestAction.DOrF, new CheckConditions(none, 1, 1), new CheckConditions(noneExact, 0, 1), new CheckConditions(noneModifiers, 1, 1), new CheckConditions(unique, 0, 0), new CheckConditions(all, 1, 0));
|
||||
toggleKey(Key.F);
|
||||
checkReleased(TestAction.D_or_F, 0, 0, 0, 0, 1);
|
||||
checkReleased(TestAction.DOrF, 0, 0, 0, 0, 1);
|
||||
toggleKey(Key.D);
|
||||
checkReleased(TestAction.D_or_F, 1, 0, 1, 1, 1);
|
||||
checkReleased(TestAction.DOrF, 1, 0, 1, 1, 1);
|
||||
|
||||
toggleKey(Key.ShiftLeft);
|
||||
toggleKey(Key.AltLeft);
|
||||
checkPressed(TestAction.Alt_and_LShift, 1, 1, 1, 1, 1);
|
||||
checkPressed(TestAction.AltAndLShift, 1, 1, 1, 1, 1);
|
||||
toggleKey(Key.A);
|
||||
checkPressed(TestAction.LShift_A, 1, 0, 0, 1, 1);
|
||||
checkPressed(TestAction.LShiftA, 1, 0, 0, 1, 1);
|
||||
toggleKey(Key.AltLeft);
|
||||
toggleKey(Key.ShiftLeft);
|
||||
});
|
||||
@@ -216,18 +216,18 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
checkPressed(TestAction.RShift, 0, 0, 0, 0, 0);
|
||||
|
||||
toggleKey(Key.A);
|
||||
checkPressed(TestAction.AnyShift_A, 0, 0, 0, 1, 1);
|
||||
checkPressed(TestAction.LShift_A, 1, 1, 1, 1, 1);
|
||||
checkPressed(TestAction.AnyShiftA, 0, 0, 0, 1, 1);
|
||||
checkPressed(TestAction.LShiftA, 1, 1, 1, 1, 1);
|
||||
checkReleased(TestAction.AnyShift, 1, 1, 1, 0, 0);
|
||||
|
||||
toggleKey(Key.ShiftRight);
|
||||
checkReleased(TestAction.LShift_A, 1, 0, 0, 0, 0);
|
||||
checkReleased(TestAction.LShiftA, 1, 0, 0, 0, 0);
|
||||
checkPressed(TestAction.RShift, 1, 0, 0, 1, 1);
|
||||
checkPressed(TestAction.AnyShift, 0, 0, 0, 0, 0);
|
||||
|
||||
toggleKey(Key.ShiftLeft);
|
||||
checkReleased(TestAction.LShift, 0, 0, 0, 1, 1);
|
||||
checkReleased(TestAction.LShift_A, 0, 1, 1, 1, 1);
|
||||
checkReleased(TestAction.LShiftA, 0, 1, 1, 1, 1);
|
||||
checkReleased(TestAction.AnyShift, 0, 0, 0, 0, 0);
|
||||
|
||||
toggleKey(Key.ShiftRight);
|
||||
@@ -244,21 +244,21 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
checkPressed(TestAction.Alt, 1, 1, 1, 1, 1);
|
||||
toggleKey(Key.A);
|
||||
checkReleased(TestAction.Alt, 1, 1, 1, 0, 0);
|
||||
checkPressed(TestAction.Alt_A, 1, 1, 1, 1, 1);
|
||||
checkPressed(TestAction.AltA, 1, 1, 1, 1, 1);
|
||||
toggleKey(Key.AltRight);
|
||||
checkPressed(TestAction.Alt, 0, 0, 0, 0, 0);
|
||||
checkReleased(TestAction.Alt_A, 0, 0, 0, 0, 0);
|
||||
checkReleased(TestAction.AltA, 0, 0, 0, 0, 0);
|
||||
toggleKey(Key.AltLeft);
|
||||
checkReleased(TestAction.Alt, 0, 0, 0, 0, 0);
|
||||
checkReleased(TestAction.Alt_A, 0, 0, 0, 0, 0);
|
||||
checkReleased(TestAction.AltA, 0, 0, 0, 0, 0);
|
||||
toggleKey(Key.AltRight);
|
||||
checkReleased(TestAction.Alt, 0, 0, 0, 1, 1);
|
||||
checkReleased(TestAction.Alt_A, 1, 1, 1, 1, 1);
|
||||
checkReleased(TestAction.AltA, 1, 1, 1, 1, 1);
|
||||
toggleKey(Key.A);
|
||||
|
||||
toggleKey(Key.ControlLeft);
|
||||
toggleKey(Key.AltLeft);
|
||||
checkPressed(TestAction.Ctrl_and_Alt, 1, 1, 1, 1, 1);
|
||||
checkPressed(TestAction.CtrlAndAlt, 1, 1, 1, 1, 1);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
toggleKey(Key.ControlLeft);
|
||||
scrollMouseWheel(0, 1);
|
||||
toggleKey(Key.ControlLeft);
|
||||
check(TestAction.Ctrl_and_WheelUp, allPressAndReleased);
|
||||
check(TestAction.CtrlAndWheelUp, allPressAndReleased);
|
||||
toggleMouseButton(MouseButton.Left);
|
||||
toggleMouseButton(MouseButton.Left);
|
||||
check(TestAction.LeftMouse, allPressAndReleased);
|
||||
@@ -320,7 +320,7 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
toggleKey(Key.ControlLeft);
|
||||
scrollMouseWheel(0, 4);
|
||||
toggleKey(Key.ControlLeft);
|
||||
check(TestAction.Ctrl_and_WheelUp, allPressAndReleased(4));
|
||||
check(TestAction.CtrlAndWheelUp, allPressAndReleased(4));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -362,37 +362,37 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
{
|
||||
A,
|
||||
S,
|
||||
D_or_F,
|
||||
Ctrl_A,
|
||||
Ctrl_S,
|
||||
Ctrl_D_or_F,
|
||||
Alt_A,
|
||||
Alt_S,
|
||||
Alt_D_or_F,
|
||||
LShift_A,
|
||||
LShift_S,
|
||||
LShift_D_or_F,
|
||||
RShift_A,
|
||||
RShift_S,
|
||||
RShift_D_or_F,
|
||||
Ctrl_Shift_A,
|
||||
Ctrl_Shift_S,
|
||||
Ctrl_Shift_D_or_F,
|
||||
DOrF,
|
||||
CtrlA,
|
||||
CtrlS,
|
||||
CtrlDOrF,
|
||||
AltA,
|
||||
AltS,
|
||||
AltDOrF,
|
||||
LShiftA,
|
||||
LShiftS,
|
||||
LShiftDOrF,
|
||||
RShiftA,
|
||||
RShiftS,
|
||||
RShiftDOrF,
|
||||
CtrlShiftA,
|
||||
CtrlShiftS,
|
||||
CtrlShiftDOrF,
|
||||
Ctrl,
|
||||
RShift,
|
||||
LShift,
|
||||
Alt,
|
||||
Alt_and_LShift,
|
||||
Ctrl_and_Alt,
|
||||
Ctrl_or_Shift,
|
||||
AltAndLShift,
|
||||
CtrlAndAlt,
|
||||
CtrlOrShift,
|
||||
LeftMouse,
|
||||
RightMouse,
|
||||
WheelUp,
|
||||
WheelDown,
|
||||
WheelLeft,
|
||||
WheelRight,
|
||||
Ctrl_and_WheelUp,
|
||||
AnyShift_A,
|
||||
CtrlAndWheelUp,
|
||||
AnyShiftA,
|
||||
AnyShift
|
||||
}
|
||||
|
||||
@@ -407,45 +407,45 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
{
|
||||
new KeyBinding(InputKey.A, TestAction.A),
|
||||
new KeyBinding(InputKey.S, TestAction.S),
|
||||
new KeyBinding(InputKey.D, TestAction.D_or_F),
|
||||
new KeyBinding(InputKey.F, TestAction.D_or_F),
|
||||
new KeyBinding(InputKey.D, TestAction.DOrF),
|
||||
new KeyBinding(InputKey.F, TestAction.DOrF),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.A }, TestAction.Ctrl_A),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.S }, TestAction.Ctrl_S),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.D }, TestAction.Ctrl_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.F }, TestAction.Ctrl_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.A }, TestAction.CtrlA),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.S }, TestAction.CtrlS),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.D }, TestAction.CtrlDOrF),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.F }, TestAction.CtrlDOrF),
|
||||
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.A }, TestAction.LShift_A),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.S }, TestAction.LShift_S),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.D }, TestAction.LShift_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.F }, TestAction.LShift_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.A }, TestAction.LShiftA),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.S }, TestAction.LShiftS),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.D }, TestAction.LShiftDOrF),
|
||||
new KeyBinding(new[] { InputKey.LShift, InputKey.F }, TestAction.LShiftDOrF),
|
||||
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.A }, TestAction.RShift_A),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.S }, TestAction.RShift_S),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.D }, TestAction.RShift_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.F }, TestAction.RShift_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.A }, TestAction.RShiftA),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.S }, TestAction.RShiftS),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.D }, TestAction.RShiftDOrF),
|
||||
new KeyBinding(new[] { InputKey.RShift, InputKey.F }, TestAction.RShiftDOrF),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Shift, InputKey.A }, TestAction.AnyShift_A),
|
||||
new KeyBinding(new[] { InputKey.Shift, InputKey.A }, TestAction.AnyShiftA),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.A }, TestAction.Alt_A),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.S }, TestAction.Alt_S),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.D }, TestAction.Alt_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.F }, TestAction.Alt_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.A }, TestAction.AltA),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.S }, TestAction.AltS),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.D }, TestAction.AltDOrF),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.F }, TestAction.AltDOrF),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.A }, TestAction.Ctrl_Shift_A),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.S }, TestAction.Ctrl_Shift_S),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.D }, TestAction.Ctrl_Shift_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.F }, TestAction.Ctrl_Shift_D_or_F),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.A }, TestAction.CtrlShiftA),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.S }, TestAction.CtrlShiftS),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.D }, TestAction.CtrlShiftDOrF),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.F }, TestAction.CtrlShiftDOrF),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control }, TestAction.Ctrl),
|
||||
new KeyBinding(new[] { InputKey.Shift }, TestAction.AnyShift),
|
||||
new KeyBinding(new[] { InputKey.LShift }, TestAction.LShift),
|
||||
new KeyBinding(new[] { InputKey.RShift }, TestAction.RShift),
|
||||
new KeyBinding(new[] { InputKey.Alt }, TestAction.Alt),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.LShift }, TestAction.Alt_and_LShift),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Alt }, TestAction.Ctrl_and_Alt),
|
||||
new KeyBinding(new[] { InputKey.Control }, TestAction.Ctrl_or_Shift),
|
||||
new KeyBinding(new[] { InputKey.Shift }, TestAction.Ctrl_or_Shift),
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.LShift }, TestAction.AltAndLShift),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Alt }, TestAction.CtrlAndAlt),
|
||||
new KeyBinding(new[] { InputKey.Control }, TestAction.CtrlOrShift),
|
||||
new KeyBinding(new[] { InputKey.Shift }, TestAction.CtrlOrShift),
|
||||
|
||||
new KeyBinding(new[] { InputKey.MouseLeft }, TestAction.LeftMouse),
|
||||
new KeyBinding(new[] { InputKey.MouseRight }, TestAction.RightMouse),
|
||||
@@ -454,7 +454,7 @@ namespace osu.Framework.Tests.Visual.Input
|
||||
new KeyBinding(new[] { InputKey.MouseWheelDown }, TestAction.WheelDown),
|
||||
new KeyBinding(new[] { InputKey.MouseWheelLeft }, TestAction.WheelLeft),
|
||||
new KeyBinding(new[] { InputKey.MouseWheelRight }, TestAction.WheelRight),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.MouseWheelUp }, TestAction.Ctrl_and_WheelUp),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.MouseWheelUp }, TestAction.CtrlAndWheelUp),
|
||||
};
|
||||
|
||||
protected override bool Handle(UIEvent e)
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace osu.Framework.Configuration
|
||||
{
|
||||
// todo: revisit when we have a way to exclude enum members from naming rules
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum FrameSync
|
||||
{
|
||||
VSync,
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using osu.Framework.Graphics.OpenGL;
|
||||
|
||||
namespace osu.Framework.Configuration
|
||||
{
|
||||
// todo: revisit when we have a way to exclude enum members from naming rules
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum RendererType
|
||||
{
|
||||
[Description("Automatic")]
|
||||
|
||||
@@ -22,6 +22,7 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
@@ -2709,6 +2710,8 @@ namespace osu.Framework.Graphics
|
||||
/// x and y counterparts can be accessed using bitwise flags.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
// todo: revisit when we have a way to exclude enum members from naming rules
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum Anchor
|
||||
{
|
||||
TopLeft = y0 | x0,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace osu.Framework.Graphics.Video
|
||||
{
|
||||
@@ -13,6 +14,8 @@ namespace osu.Framework.Graphics.Video
|
||||
/// Contains decoders for ALL platforms.
|
||||
/// </remarks>
|
||||
[Flags]
|
||||
// todo: revisit when we have a way to exclude enum members from naming rules
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum HardwareVideoDecoder
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -683,6 +683,8 @@ namespace osu.Framework.Input.Bindings
|
||||
/// <summary>
|
||||
/// The secondary backslash key.
|
||||
/// </summary>
|
||||
// todo: revisit when we have a way to exclude enum members from naming rules
|
||||
// ReSharper disable once InconsistentNaming
|
||||
NonUSBackSlash = 130,
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,8 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace osu.Framework.Platform.Linux.Native
|
||||
{
|
||||
public static class Library
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace osu.Framework.Platform.MacOS.Native
|
||||
{
|
||||
public enum NSStringEncoding : uint
|
||||
|
||||
@@ -5,6 +5,8 @@ using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace osu.Framework.Platform.Windows.Native
|
||||
{
|
||||
internal static class Execution
|
||||
|
||||
@@ -8,6 +8,8 @@ using System.Text;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
using osu.Framework.Extensions.EnumExtensions;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace osu.Framework.Platform.Windows.Native
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,6 +5,8 @@ using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace osu.Framework.Platform.Windows.Native
|
||||
{
|
||||
internal static class Input
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
@@ -321,6 +322,7 @@ namespace osu.Framework.Platform.Windows
|
||||
[DllImport("SHCore.dll", SetLastError = true)]
|
||||
internal static extern bool SetProcessDpiAwareness(ProcessDpiAwareness awareness);
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
internal enum ProcessDpiAwareness
|
||||
{
|
||||
Process_DPI_Unaware = 0,
|
||||
@@ -332,7 +334,7 @@ namespace osu.Framework.Platform.Windows
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
internal static extern bool SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT value);
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
internal enum DPI_AWARENESS_CONTEXT
|
||||
{
|
||||
DPI_AWARENESS_CONTEXT_UNAWARE = -1,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -100,6 +101,7 @@ namespace osu.Framework.Platform.Windows
|
||||
[DllImport("shell32.dll")]
|
||||
private static extern int SHQueryUserNotificationState(out QueryUserNotificationState state);
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
private enum QueryUserNotificationState
|
||||
{
|
||||
QUNS_NOT_PRESENT = 1,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Reflection;
|
||||
using osu.Framework.Development;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
@@ -62,6 +63,8 @@ namespace osu.Framework
|
||||
throw new PlatformNotSupportedException("Operating system could not be detected correctly.");
|
||||
}
|
||||
|
||||
// todo: revisit when we have a way to exclude enum members from naming rules
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum Platform
|
||||
{
|
||||
Windows = 1,
|
||||
|
||||
@@ -74,12 +74,12 @@ namespace osu.Framework.Statistics
|
||||
case source_runtime:
|
||||
switch ((GCEventType)data.EventId)
|
||||
{
|
||||
case GCEventType.GCStart_V1 when data.Payload != null:
|
||||
case GCEventType.GCStartV1 when data.Payload != null:
|
||||
// https://docs.microsoft.com/en-us/dotnet/framework/performance/garbage-collection-etw-events#gcstart_v1_event
|
||||
GlobalStatistics.Get<int>(gc_statistics_grouping, $"Collections Gen{data.Payload[1]}").Value++;
|
||||
break;
|
||||
|
||||
case GCEventType.GCHeapStats_V1 when data.Payload != null:
|
||||
case GCEventType.GCHeapStatsV1 when data.Payload != null:
|
||||
// https://docs.microsoft.com/en-us/dotnet/framework/performance/garbage-collection-etw-events#gcheapstats_v1_event
|
||||
for (int i = 0; i <= 6; i += 2)
|
||||
addStatistic<ulong>($"Size Gen{i / 2}", data.Payload[i]);
|
||||
@@ -88,7 +88,7 @@ namespace osu.Framework.Statistics
|
||||
addStatistic<uint>("Pinned objects", data.Payload[10]);
|
||||
break;
|
||||
|
||||
case GCEventType.GCAllocationTick_V2 when data.Payload != null:
|
||||
case GCEventType.GCAllocationTickV2 when data.Payload != null:
|
||||
string name = (string)data.Payload[5];
|
||||
if (string.IsNullOrEmpty(name))
|
||||
break;
|
||||
@@ -134,9 +134,9 @@ namespace osu.Framework.Statistics
|
||||
|
||||
private enum GCEventType
|
||||
{
|
||||
GCStart_V1 = 1,
|
||||
GCHeapStats_V1 = 4,
|
||||
GCAllocationTick_V2 = 10,
|
||||
GCStartV1 = 1,
|
||||
GCHeapStatsV1 = 4,
|
||||
GCAllocationTickV2 = 10,
|
||||
FinalizeObject = 29
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user