Skip to content

Commit

Permalink
Forward all HarmonyX types
Browse files Browse the repository at this point in the history
  • Loading branch information
bbepis committed Aug 28, 2021
1 parent 42878cb commit 33e7e0f
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 6 deletions.
76 changes: 76 additions & 0 deletions MelonLoader/AssemblyAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("BepInEx.MelonLoader.Loader")]

#region Harmony Exports

[assembly: TypeForwardedTo(typeof(HarmonyLib.DelegateTypeFactory))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.GetterHandler<,>))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.SetterHandler<,>))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.InstantiationHandler<>))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.FastAccess))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.FastInvokeHandler))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.MethodInvoker))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.MethodType))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.ArgumentType))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPatchType))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyReversePatchType))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.MethodDispatchType))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyAttribute))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPatch))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyDelegate))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyReversePatch))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPatchAll))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPriority))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyBefore))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyAfter))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyDebug))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyWrapSafe))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPrepare))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyCleanup))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyTargetMethod))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyTargetMethods))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPrefix))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyPostfix))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyTranspiler))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyILManipulator))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyFinalizer))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyArgument))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.CodeInstruction))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.ExceptionBlockType))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.ExceptionBlock))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.InvalidHarmonyPatchArgumentException))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.MemberNotFoundException))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Harmony))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyException))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyMethod))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyMethodExtensions))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.InlineSignature))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.PatchInfo))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Patch))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.PatchClassProcessor))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Patches))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.PatchProcessor))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Priority))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.ReversePatcher))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Transpilers))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.AccessTools))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.CodeMatch))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.CodeMatcher))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.GeneralExtensions))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.CodeInstructionExtensions))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.CollectionExtensions))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.MethodBaseExtensions))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.FileLog))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.SymbolExtensions))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Traverse<>))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Traverse))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Tools.HarmonyFileLog))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Tools.Logger))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Public.Patching.HarmonyManipulator))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Public.Patching.ManagedMethodPatcher))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Public.Patching.MethodPatcher))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Public.Patching.NativeDetourMethodPatcher))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Public.Patching.PatchManager))]

#endregion
6 changes: 0 additions & 6 deletions MelonLoader/Core.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using System;
using System.Runtime.CompilerServices;
using BepInEx.Configuration;

[assembly: InternalsVisibleTo("BepInEx.MelonLoader.Loader")]
[assembly: TypeForwardedTo(typeof(HarmonyLib.Harmony))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.HarmonyMethod))]
[assembly: TypeForwardedTo(typeof(HarmonyLib.AccessTools))]

namespace MelonLoader
{
internal static class Core
Expand Down
1 change: 1 addition & 0 deletions MelonLoader/MelonLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyAttributes.cs" />
<Compile Include="Extensions\Il2CppAssemblyGenerator.cs" />
<Compile Include="Extensions\Layers\Harmony\Attributes.cs" />
<Compile Include="Extensions\Layers\Harmony\Extras\DelegateTypeFactory.cs" />
Expand Down

0 comments on commit 33e7e0f

Please sign in to comment.