diff --git a/Harmony/Documentation/articles/patching-auxilary.md b/Harmony/Documentation/articles/patching-auxilary.md index 021f8951..73bfa698 100644 --- a/Harmony/Documentation/articles/patching-auxilary.md +++ b/Harmony/Documentation/articles/patching-auxilary.md @@ -42,7 +42,7 @@ static MethodBase TargetMethod(...) static MethodBase CalculateMethod(...) ``` -That method, if it exists, is expected to return a `MethodBase` of the method to be patched. +That method, if it exists, is expected to return a `MethodBase` of the method to be patched. The return cannot be null. If you want to conditionally skip patching, use a `Prepare()` method. ### TargetMethods @@ -59,6 +59,8 @@ A typical implementation would `yield` the results like this: [!code-csharp[example](../examples/patching-auxilary.cs?name=yield)] +Similar to `TargetMethod`, the implementation cannot return zero results. If you want to conditionally skip patching, use a `Prepare()` method. + ### Cleanup After patching, Harmony gives you a chance to clean up your state. For this, Harmony searches for a method called