Harmony 2.0.2
Fixes:
- MonoMod.Common updated to v20.5.31.1
- Method serialization now uses module guid instead of name [ca5fd9b]
AccessTools.Method(string typeColonMethodname, ...)
uses "Namespace.Type:MethodName" as format- Include type in patched method names for stack traces [1bdd4b4]
Traverse
now handles chaining static then non-static member calls correctly [2b6ad84]FastInvokeHandler
now usesparams
for varargs [c9934e1]PatchTools.GetPatchMethods
now returns every method, not just the ones to be patched #304 [31b4773]GetOriginalInstructions
/GetCurrentInstructions
now populatecode.labels
correctly- Fix exception in
Harmony.PatchAll
/AccessTools.TypeByName
when assembly dependencies are missing [a0c3620] [424c2ce] - Preparatory work for: delegate injection,
AccessTools.FieldRef
improvements (work in progress, more in next release)
New API for CodeInstruction:
codeInstruction.WithLabels(params Label[] labels)
codeInstruction.WithLabels(IEnumerable<Label> labels)
codeInstruction.ExtractLabels(this CodeInstruction code)
codeInstruction.MoveLabelsTo(CodeInstruction other)
codeInstruction.MoveLabelsFrom(CodeInstruction other)
codeInstruction.WithBlocks(params ExceptionBlock[] blocks)
codeInstruction.WithBlocks(IEnumerable<ExceptionBlock> blocks)
codeInstruction.ExtractBlocks(this CodeInstruction code)
codeInstruction.MoveBlocksTo(CodeInstruction other)
codeInstruction.MoveBlocksFrom(CodeInstruction other)
New API in PatchProcessor:
PatchProcessor.CreateILGenerator(MethodBase original)
New API in AccessTools:
AccessTools.MethodDelegate<DelegateType>(MethodInfo method, object instance = null, bool virtualCall = true)
AccessTools.HarmonyDelegate<DelegateType>(object instance = null)
AccessTools.IsStatic(MemberInfo member)