Enable CA1052 and fix noncompliance

"Static holder types should be Static or NotInheritable" (classes with only
static members should be static classes)
This commit is contained in:
YoshiRulz 2020-06-18 05:10:17 +10:00
parent 16d1782c9e
commit 620e54580d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
14 changed files with 13 additions and 16 deletions

View File

@ -62,9 +62,6 @@
<!-- Do not declare visible instance fields -->
<Rule Id="CA1051" Action="Hidden" />
<!-- Static holder types should be Static or NotInheritable -->
<Rule Id="CA1052" Action="Hidden" />
<!-- Uri parameters should not be strings -->
<Rule Id="CA1054" Action="Hidden" />

View File

@ -5,7 +5,7 @@ using System.Drawing;
namespace BizHawk.Bizware.BizwareGL
{
public class TexAtlas
public static class TexAtlas
{
public class RectItem
{

View File

@ -35,7 +35,7 @@ namespace BizHawk.Client.Common
}
public class OpenAdvancedSerializer
public static class OpenAdvancedSerializer
{
public static IOpenAdvanced ParseWithLegacy(string text)
{

View File

@ -11,7 +11,7 @@ using BizHawk.Emulation.Common;
// ReSharper disable StyleCop.SA1401
namespace BizHawk.Client.Common
{
public class QuickBmpFile
public static class QuickBmpFile
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private class BITMAPFILEHEADER

View File

@ -3,7 +3,7 @@
// TODO - kill this file (or renew the concept as distinct from the LuaSandbox?)
namespace BizHawk.Client.Common
{
public class EnvironmentSandbox
public static class EnvironmentSandbox
{
public static void Sandbox(Action callback)
{

View File

@ -4,7 +4,7 @@ using BizHawk.Emulation.DiscSystem;
namespace BizHawk.Client.DiscoHawk
{
public class AudioExtractor
public static class AudioExtractor
{
public static string FFmpegPath;

View File

@ -12,7 +12,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
public class Communication
public static class Communication
{
public class HttpCommunication
{

View File

@ -4,7 +4,7 @@ using System.Reflection;
namespace BizHawk.Client.EmuHawk
{
public class JumpLists
public static class JumpLists
{
private static readonly Type JumpList;
private static readonly Type JumpTask;

View File

@ -14,7 +14,7 @@ namespace BizHawk.Common
{
// fields are serialized/deserialized in their memory order as reported by Marshal.OffsetOf
// to do anything useful, passed targets should be [StructLayout.Sequential] or [StructLayout.Explicit]
public class BinaryQuickSerializer
public static class BinaryQuickSerializer
{
private static MethodInfo FromExpression(Expression e)
{

View File

@ -13,7 +13,7 @@ namespace BizHawk.Common
{
}
public class DeepEquality
public static class DeepEquality
{
/// <summary>
/// return true if an array type is not 0-based

View File

@ -9,7 +9,7 @@ using System.ComponentModel;
namespace BizHawk.Common
{
public class SettingsUtil
public static class SettingsUtil
{
private sealed class DefaultValueSetter
{

View File

@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
namespace BizHawk.Emulation.Cores.Components.ARM
{
public class Darm
public static class Darm
{
public const string dllname = "libdarm.dll";
public const CallingConvention cc = CallingConvention.Cdecl;

View File

@ -2,7 +2,7 @@
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
public class GBColors
public static class GBColors
{
/*
* The GBC uses a RGB555 color space, but it most definately does not resemble sRGB at all.

View File

@ -2,7 +2,7 @@
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
{
public class Nes_NTSC_Colors
public static class Nes_NTSC_Colors
{
// just the color deemphasis routines from nes_ntsc