using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("BetterUnityPlugin")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1+Branch.tags-v1.1.1.Sha.89bbfc2f44403bc6ceeff78b8a0a1d2401c458f0")]
[assembly: AssemblyProduct("BetterUnityPlugin")]
[assembly: AssemblyTitle("BetterUnityPlugin")]
[assembly: AssemblyVersion("1.1.1.0")]
namespace BetterUnityPlugin;
public abstract class BetterUnityPlugin<T> : BaseUnityPlugin
{
public class HookManager
{
private List<(MethodInfo methodFrom, MethodInfo methodTo)> hookSignatures = new List<(MethodInfo, MethodInfo)>();
private List<(MethodInfo methodFrom, Manipulator ILHookMethod)> ILHookMethods = new List<(MethodInfo, Manipulator)>();
private List<Hook> hooks = new List<Hook>();
private List<ILHook> ILHooks = new List<ILHook>();
private bool enabled;
public HookManager()
{
BetterUnityPlugin<T>.onEnable += BetterUnityPlugin_onEnable;
BetterUnityPlugin<T>.onDisable += BetterUnityPlugin_onDisable;
}
private void BetterUnityPlugin_onEnable()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Expected O, but got Unknown
enabled = true;
foreach (var hookSignature in hookSignatures)
{
hooks.Add(new Hook((MethodBase)hookSignature.methodFrom, hookSignature.methodTo));
}
foreach (var iLHookMethod in ILHookMethods)
{
ILHooks.Add(new ILHook((MethodBase)iLHookMethod.methodFrom, iLHookMethod.ILHookMethod));
}
}
private void BetterUnityPlugin_onDisable()
{
enabled = false;
foreach (Hook hook in hooks)
{
hook.Dispose();
}
foreach (ILHook iLHook in ILHooks)
{
iLHook.Dispose();
}
}
public static MethodInfo FindMethod(Type type, string methodName, Type[] types, BindingFlags bindings = BindingFlags.Default)
{
if (bindings != 0)
{
return type.GetMethod(methodName, bindings, null, types, null) ?? type.GetMethod(methodName, bindings);
}
return type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public) ?? type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic);
}
public static Type[] getParameterTypes(MethodInfo methodInfo)
{
List<Type> list = new List<Type>();
ParameterInfo[] parameters = methodInfo.GetParameters();
for (int i = 1; i < parameters.Length; i++)
{
list.Add(parameters[i].ParameterType);
}
return list.ToArray();
}
public void Add(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[0], ILHookMethod, bindings);
}
public void Add(Type type, string methodName, Delegate hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add(Type type, string methodName, Action<Action> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add<T1>(string methodName, Delegate hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, getParameterTypes(hookMethod.Method), hookMethod.Method, bindings);
}
public void Add<T1>(Type type, string methodName, Action<Action<T1>, T1> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[1] { typeof(T1) }, hookMethod.Method, bindings);
}
public void Add<T1>(Type type, string methodName, Func<Func<T1>, T1> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add<T1>(string methodName, Action<Action> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add<T1>(string methodName, Action<Action<T1>, T1> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add<T1>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[0], ILHookMethod, bindings);
}
public void Add<T1>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[1] { typeof(T1) }, ILHookMethod, bindings);
}
public void Add<T1, T2>(Type type, string methodName, Action<Action<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[2]
{
typeof(T1),
typeof(T2)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2>(Type type, string methodName, Func<Func<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[1] { typeof(T1) }, hookMethod.Method, bindings);
}
public void Add<T1, T2>(string methodName, Action<Action<T2>, T2> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings);
}
public void Add<T1, T2>(string methodName, Func<Func<T2>, T2> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add<T1, T2>(string methodName, Action<Action<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings);
}
public void Add<T1, T2>(string methodName, Func<Func<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings);
}
public void Add<T1, T2>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, ILHookMethod, bindings);
}
public void Add<T1, T2>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[1] { typeof(T2) }, ILHookMethod, bindings);
}
public void Add<T1, T2, T3>(Type type, string methodName, Action<Action<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[3]
{
typeof(T1),
typeof(T2),
typeof(T3)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3>(Type type, string methodName, Func<Func<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[2]
{
typeof(T1),
typeof(T2)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3>(string methodName, Action<Action<T2, T3>, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[2]
{
typeof(T2),
typeof(T3)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3>(string methodName, Func<Func<T2, T3>, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3>(string methodName, Action<Action<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[2]
{
typeof(T2),
typeof(T3)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3>(string methodName, Func<Func<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[2]
{
typeof(T2),
typeof(T3)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[2]
{
typeof(T2),
typeof(T3)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4>(Type type, string methodName, Action<Action<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[4]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4>(Type type, string methodName, Func<Func<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[3]
{
typeof(T1),
typeof(T2),
typeof(T3)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4>(string methodName, Action<Action<T2, T3, T4>, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[3]
{
typeof(T2),
typeof(T3),
typeof(T4)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4>(string methodName, Func<Func<T2, T3, T4>, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[2]
{
typeof(T2),
typeof(T3)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4>(string methodName, Action<Action<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[3]
{
typeof(T2),
typeof(T3),
typeof(T4)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4>(string methodName, Func<Func<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[2]
{
typeof(T2),
typeof(T3)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[3]
{
typeof(T2),
typeof(T3),
typeof(T4)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[3]
{
typeof(T2),
typeof(T3),
typeof(T4)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[5]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[4]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5>(string methodName, Action<Action<T2, T3, T4, T5>, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[4]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5>(string methodName, Func<Func<T2, T3, T4, T5>, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[3]
{
typeof(T2),
typeof(T3),
typeof(T4)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5>(string methodName, Action<Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[4]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5>(string methodName, Func<Func<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[3]
{
typeof(T2),
typeof(T3),
typeof(T4)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[4]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[4]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[6]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[5]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Action<Action<T2, T3, T4, T5, T6>, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[5]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Func<Func<T2, T3, T4, T5, T6>, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[4]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[5]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[4]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[5]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[5]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[7]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[6]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7>, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[6]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7>, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[5]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[6]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[5]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[6]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[6]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[8]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[7]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8>, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[7]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8>, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[6]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[7]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[6]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[7]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[7]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[9]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[8]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9>, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[8]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9>, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[7]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[8]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[7]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[8]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[8]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[10]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[9]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10>, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[9]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10>, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[8]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[9]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[8]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[9]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[9]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[11]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[10]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[10]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[9]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[10]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[9]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[10]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[10]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[12]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[11]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[11]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[10]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[11]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[10]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[11]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[11]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[13]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[12]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[12]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[11]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[12]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[11]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[12]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[12]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[14]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[13]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[13]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[12]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[13]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[12]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[13]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[13]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[15]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14),
typeof(T15)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[14]
{
typeof(T1),
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[14]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14),
typeof(T15)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[13]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[14]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14),
typeof(T15)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[13]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14)
}, hookMethod.Method, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(typeof(T1), methodName, new Type[14]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14),
typeof(T15)
}, ILHookMethod, bindings);
}
public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
Add(type, methodName, new Type[14]
{
typeof(T2),
typeof(T3),
typeof(T4),
typeof(T5),
typeof(T6),
typeof(T7),
typeof(T8),
typeof(T9),
typeof(T10),
typeof(T11),
typeof(T12),
typeof(T13),
typeof(T14),
typeof(T15)
}, ILHookMethod, bindings);
}
public void Add(Type type, string methodName, Type[] types, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default)
{
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
MethodInfo methodInfo = FindMethod(type, methodName, types, bindings);
if (methodInfo == null)
{
Debug.LogError((object)$"Could not hook method {methodName} of {type}, method not found.");
return;
}
ILHookMethods.Add((methodInfo, ILHookMethod));
if (enabled)
{
ILHooks.Add(new ILHook((MethodBase)methodInfo, ILHookMethod));
}
}
public void Add(Type type, string methodName, Type[] types, MethodInfo hookMethod, BindingFlags bindings = BindingFlags.Default)
{
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
MethodInfo methodInfo = FindMethod(type, methodName, types, bindings);
if (methodInfo == null)
{
Debug.LogError((object)$"Could not hook method {methodName} of {type}, method not found.");
return;
}
hookSignatures.Add((methodInfo, hookMethod));
if (enabled)
{
hooks.Add(new Hook((MethodBase)methodInfo, hookMethod));
}
}
}
public static HookManager Hooks = new HookManager();
public abstract BaseUnityPlugin typeReference { get; }
public static event Action onAwake;
public static event Action onStart;
public static event Action onEnable;
public static event Action onDisable;
public static event Action onUpdate;
public static event Action onReset;
public static event Action onFixedUpdate;
public static event Action onLateUpdate;
public static event Action onDestroy;
protected virtual void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
GameObject gameObject = ((Component)this).gameObject;
((Object)gameObject).hideFlags = (HideFlags)(((Object)gameObject).hideFlags | 0x3D);
if (BetterUnityPlugin<T>.onAwake != null)
{
BetterUnityPlugin<T>.onAwake();
}
}
protected virtual void Start()
{
if (BetterUnityPlugin<T>.onStart != null)
{
BetterUnityPlugin<T>.onStart();
}
}
protected virtual void OnEnable()
{
if (BetterUnityPlugin<T>.onEnable != null)
{
BetterUnityPlugin<T>.onEnable();
}
}
protected virtual void OnDisable()
{
if (BetterUnityPlugin<T>.onDisable != null)
{
BetterUnityPlugin<T>.onDisable();
}
}
protected virtual void Update()
{
if (BetterUnityPlugin<T>.onUpdate != null)
{
BetterUnityPlugin<T>.onUpdate();
}
}
protected virtual void FixedUpdate()
{
if (BetterUnityPlugin<T>.onFixedUpdate != null)
{
BetterUnityPlugin<T>.onFixedUpdate();
}
}
protected virtual void LateUpdate()
{
if (BetterUnityPlugin<T>.onLateUpdate != null)
{
BetterUnityPlugin<T>.onLateUpdate();
}
}
protected virtual void OnDestroy()
{
if (BetterUnityPlugin<T>.onDestroy != null)
{
BetterUnityPlugin<T>.onDestroy();
}
}
protected virtual void Reset()
{
if (BetterUnityPlugin<T>.onReset != null)
{
BetterUnityPlugin<T>.onReset();
}
}
}