Skip to content

Commit

Permalink
Update documentation [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike-bot committed Dec 4, 2023
1 parent 18ce5f7 commit c6e42d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/articles/patching-auxiliary.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<h1 id="patching">Patching</h1>

<h2 id="auxiliary-patch-methods">Auxiliary patch methods</h2>
<p>If you use manual patching, you are in full control of your state and the execution and handling of extra resources and logic. For annotation patching, Harmony offers you a number of methods you can implement on a patch class that allow you to execute code before and after patching on that class as well as methods that combine annotations with manually defining which methods that should be patched.</p>
<p>If you use manual patching, you are in full control of your state and the execution and handling of extra resources and logic. For annotation patching, Harmony offers you a number of methods you can implement on a patch class that allow you to execute code before and after patching on that class as well as methods that combine annotations with manually defining which methods should be patched.</p>
<p>Each of those methods can take up to three optional arguments that are injected by type so you can call them anything you like:</p>
<ul>
<li><code>MethodBase original</code> - the current original being patched</li>
Expand Down Expand Up @@ -123,7 +123,7 @@ <h3 id="targetmethods">TargetMethods</h3>
<p>If you want to patch multiple methods with the same patch, you can use <code>TargetMethods</code>. It has the same behaviour as <code>TargetMethod</code> except that it returns an enumeration of <code>MethodBase</code> instead of a single <code>MethodBase</code>:</p>
<pre><code class="lang-csharp">static IEnumerable&lt;MethodBase&gt; TargetMethods(...)
// or
[HarmonyTargetMethod]
[HarmonyTargetMethods]
static IEnumerable&lt;MethodBase&gt; CalculateMethods(...)
</code></pre>
<p>A typical implementation would <code>yield</code> the results like this:</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@
"output": {
".html": {
"relative_path": "articles/patching-auxiliary.html",
"hash": "K5sWXSOyqzl3aJjAlEh/PFRGsPXbqhb47iGwcT+hL/s="
"hash": "pq2tOlq68MhdkHL660NR9Hj28xw0mjHeR4uJ0oe88HI="
}
},
"is_incremental": false,
Expand Down

0 comments on commit c6e42d8

Please sign in to comment.