ObjectiveHarmonyPatch 1.1.0

dotnet add package ObjectiveHarmonyPatch --version 1.1.0                
NuGet\Install-Package ObjectiveHarmonyPatch -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ObjectiveHarmonyPatch" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ObjectiveHarmonyPatch --version 1.1.0                
#r "nuget: ObjectiveHarmonyPatch, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ObjectiveHarmonyPatch as a Cake Addin
#addin nuget:?package=ObjectiveHarmonyPatch&version=1.1.0

// Install ObjectiveHarmonyPatch as a Cake Tool
#tool nuget:?package=ObjectiveHarmonyPatch&version=1.1.0                

ObjectiveHarmonyPatch

Harmony のパッチをオブジェクティブに管理できるようにします。

Usage

パッチの作成

MethodBase myMethod = /* 関連付けたいメソッドの MethodBase */;
HarmonyPatch patch = HarmonyPatch.Patch("MyPatch", myMethod, PatchType.Prefix);
patch.Invoked += Prefix;

PatchInvokationResult Prefix(object sender, PatchInvokedEventArgs e)
{
    // 実行したい処理

    return new PatchInvokationResult(/* 戻り値 */, SkipModes.SkipOriginal);
    // または
    // return PatchInvokationResult.DoNothing(e);
};

パッチの解放

patch.Dispose();

インストール方法

NuGet からパッケージをインストールしてください。

使用ライブラリ等

Harmony (MIT)

Copyright (c) 2017 Andreas Pardeike

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 339 2/9/2024
1.0.0 648 5/29/2023