.NET Format Style Fixes

This commit is contained in:
refringe
2025-06-18 17:09:20 +00:00
committed by Format Bot
parent ca0a7d6345
commit 6e01428b2b
774 changed files with 23507 additions and 40003 deletions
@@ -25,13 +25,17 @@ public abstract class AbstractPatch
_finalizerList = GetPatchMethods(typeof(PatchFinalizerAttribute));
_ilManipulatorList = GetPatchMethods(typeof(PatchIlManipulatorAttribute));
if (_prefixList.Count == 0
if (
_prefixList.Count == 0
&& _postfixList.Count == 0
&& _transpilerList.Count == 0
&& _finalizerList.Count == 0
&& _ilManipulatorList.Count == 0)
&& _ilManipulatorList.Count == 0
)
{
throw new Exception($"{_harmony.Id}: At least one of the patch methods must be specified");
throw new Exception(
$"{_harmony.Id}: At least one of the patch methods must be specified"
);
}
}
@@ -51,8 +55,14 @@ public abstract class AbstractPatch
var T = GetType();
var methods = new List<HarmonyMethod>();
foreach (var method in T.GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public |
BindingFlags.DeclaredOnly))
foreach (
var method in T.GetMethods(
BindingFlags.Static
| BindingFlags.NonPublic
| BindingFlags.Public
| BindingFlags.DeclaredOnly
)
)
{
if (method.GetCustomAttribute(attributeType) != null)
{
@@ -1,27 +1,17 @@
namespace SPTarkov.Reflection.Patching
{
[AttributeUsage(AttributeTargets.Method)]
public class PatchPrefixAttribute : Attribute
{
}
public class PatchPrefixAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Method)]
public class PatchPostfixAttribute : Attribute
{
}
public class PatchPostfixAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Method)]
public class PatchTranspilerAttribute : Attribute
{
}
public class PatchTranspilerAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Method)]
public class PatchFinalizerAttribute : Attribute
{
}
public class PatchFinalizerAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Method)]
public class PatchIlManipulatorAttribute : Attribute
{
}
public class PatchIlManipulatorAttribute : Attribute { }
}