> Prefixで元のメソッドでスキップが https://github.com/pardeike/Harmony/wiki/Patching
一番下に
// prefix
// - wants instance, result and count
// - wants to change count
// - returns a boolean that controls if original is executed (true) or not (false)
static bool Prefix(Customer __instance, List<string> __result, ref int count)
って書いてあるので、戻り値で制御できるのではないですかね。これもバージョンによるかもしれませんけど。。。
元メソッドの中身を見てないのですけど、ほかの処理も入っていたらそれもスキップしてしまうので、注意してください。
namespace Test
{
[StaticConstructorOnStartup]
class Main
{
static Main()
{
var harmony = HarmonyInstance.Create("com.test.fixedvalue");
harmony.PatchAll(Assembly.GetExecutingAssembly());
}
}