.NET Format Style Fixes
This commit is contained in:
@@ -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 { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user