Skip to content

Commit ab8e2d3

Browse files
committed
Remove ReferenceBag references
1 parent b9b7871 commit ab8e2d3

File tree

7 files changed

+15
-21
lines changed

7 files changed

+15
-21
lines changed

ModFramework.Modules.CSharp/ModFramework.Modules.CSharp.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<PackageVersion>1.1.9</PackageVersion>
6-
<Version>1.1.9</Version>
5+
<PackageVersion>1.1.10</PackageVersion>
6+
<Version>1.1.10</Version>
77
<PackageId>ModFramework.Modules.CSharp</PackageId>
88
<Authors>DeathCradle</Authors>
99
<PackOnBuild>true</PackOnBuild>
@@ -21,7 +21,6 @@
2121
</PropertyGroup>
2222
<ItemGroup>
2323
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.12.0" />
24-
<PackageReference Include="MonoMod" Version="22.7.31.1" />
2524
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2625
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="9.0.0" />
2726
</ItemGroup>

ModFramework.Modules.ClearScript/ModFramework.Modules.ClearScript.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<PackageVersion>1.1.9</PackageVersion>
6-
<Version>1.1.9</Version>
5+
<PackageVersion>1.1.10</PackageVersion>
6+
<Version>1.1.10</Version>
77
<Authors>DeathCradle</Authors>
88
<Copyright>Copyright 2016-2024</Copyright>
99
<PackageId>ModFramework.Modules.ClearScript</PackageId>
@@ -25,7 +25,6 @@
2525
</ItemGroup>
2626
<ItemGroup>
2727
<PackageReference Include="Microsoft.ClearScript" Version="7.4.5" />
28-
<PackageReference Include="MonoMod" Version="22.7.31.1" />
2928
<PackageReference Include="Microsoft.ClearScript.V8.Native.osx-x64" Version="7.4.5" />
3029
<PackageReference Include="Microsoft.ClearScript.linux-x64" Version="7.4.5" />
3130
</ItemGroup>

ModFramework.Modules.Lua/ModFramework.Modules.Lua.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<PackageVersion>1.1.9</PackageVersion>
6-
<Version>1.1.9</Version>
5+
<PackageVersion>1.1.10</PackageVersion>
6+
<Version>1.1.10</Version>
77
<PackageId>ModFramework.Modules.Lua</PackageId>
88
<Authors>DeathCradle</Authors>
99
<PackOnBuild>true</PackOnBuild>

ModFramework.Tests/AssemblyLoadContextTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using Microsoft.VisualStudio.TestTools.UnitTesting;
2-
using ModFramework.Modules.CSharp;
3-
using ModFramework.Plugins;
42
using System;
53
using System.IO;
64
using System.Linq;

ModFramework/Extensions/CecilHelpers.Extensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ namespace ModFramework;
3232
public static class CecilHelpersExtensions
3333
{
3434
public static ILCursor GetILCursor(this MonoMod.MonoModder modder, Expression<Action> reference, bool followRedirect = true)
35-
=> new ILCursor(new ILContext(modder.Module.GetDefinition<MethodDefinition>(reference, followRedirect)) { ReferenceBag = RuntimeILReferenceBag.Instance });
35+
=> new ILCursor(new ILContext(modder.Module.GetDefinition<MethodDefinition>(reference, followRedirect)));
3636

3737
public static ILCursor GetILCursor(this MonoMod.MonoModder modder, MethodDefinition method)
38-
=> new ILCursor(new ILContext(method) { ReferenceBag = RuntimeILReferenceBag.Instance });
38+
=> new ILCursor(new ILContext(method));
3939

4040
public static MethodDefinition GetMethodDefinition(this MonoMod.MonoModder modder, Expression<Action> reference, bool followRedirect = true)
4141
=> modder.Module.GetDefinition<MethodDefinition>(reference, followRedirect: followRedirect);
@@ -46,10 +46,10 @@ public static TypeDefinition GetDefinition<TType>(this MonoMod.MonoModder modder
4646
=> modder.Module.GetDefinition<TType>();
4747

4848
public static ILCursor GetILCursor(this ModuleDefinition module, Expression<Action> reference)
49-
=> new ILCursor(new ILContext(module.GetDefinition<MethodDefinition>(reference)) { ReferenceBag = RuntimeILReferenceBag.Instance });
49+
=> new ILCursor(new ILContext(module.GetDefinition<MethodDefinition>(reference)));
5050

5151
public static ILCursor GetILCursor(this MethodDefinition method)
52-
=> new ILCursor(new ILContext(method) { ReferenceBag = RuntimeILReferenceBag.Instance });
52+
=> new ILCursor(new ILContext(method));
5353

5454
public static MethodReference GetReference<TReturn>(this ModuleDefinition module, Expression<Func<TReturn>> reference)
5555
=> (MethodReference)module.GetMemberReference(reference);

ModFramework/ModFramework.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<PackageVersion>1.1.9</PackageVersion>
6-
<Version>1.1.9</Version>
5+
<PackageVersion>1.1.10</PackageVersion>
6+
<Version>1.1.10</Version>
77
<PackageId>ModFramework</PackageId>
88
<Authors>DeathCradle</Authors>
99
<PackOnBuild>true</PackOnBuild>
@@ -20,9 +20,7 @@
2020
</PropertyGroup>
2121
<ItemGroup>
2222
<PackageReference Include="MonoMod" Version="22.7.31.1" />
23-
<PackageReference Include="MonoMod.RuntimeDetour.HookGen" Version="22.7.31.1" />
2423
<PackageReference Include="NuGet.Protocol" Version="6.12.1" />
25-
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
2624
</ItemGroup>
2725
<Target Name="CleanAll" AfterTargets="Clean">
2826
<RemoveDir Directories="$(OUTDIR)" />

ModFramework/Modder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ public override void PatchRefsInMethod(MethodDefinition method)
211211

212212
RunTasks(t => t.Relink(method));
213213

214-
// pending: https://github.com/MonoMod/MonoMod/pull/92
215-
for (int i = 0; i < method.MethodReturnType.CustomAttributes.Count; i++)
216-
PatchRefsInCustomAttribute(method.MethodReturnType.CustomAttributes[i] = method.MethodReturnType.CustomAttributes[i].Relink(Relinker, method));
214+
//// pending: https://github.com/MonoMod/MonoMod/pull/92
215+
//for (int i = 0; i < method.MethodReturnType.CustomAttributes.Count; i++)
216+
// PatchRefsInCustomAttribute(method.MethodReturnType.CustomAttributes[i] = method.MethodReturnType.CustomAttributes[i].Relink(Relinker, method));
217217
}
218218

219219
public override void AutoPatch()

0 commit comments

Comments
 (0)