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 Feb 23, 2024
1 parent b2eb250 commit 3c257bb
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 4 deletions.
158 changes: 158 additions & 0 deletions docs/api/HarmonyLib.RefResult-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Delegate RefResult&lt;T&gt;
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Delegate RefResult&lt;T&gt;
">
<meta name="generator" content="docfx 2.59.4.0">

<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">



</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>

<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>

<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">

<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="HarmonyLib.RefResult`1">


<h1 id="HarmonyLib_RefResult_1" data-uid="HarmonyLib.RefResult`1" class="text-break">Delegate RefResult&lt;T&gt;
</h1>
<div class="markdown level0 summary"><p>Delegate type for &quot;ref return&quot; injections</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="HarmonyLib.html">HarmonyLib</a></h6>
<h6><strong>Assembly</strong>: 0Harmony.dll</h6>
<h5 id="HarmonyLib_RefResult_1_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public delegate ref T RefResult&lt;T&gt;();</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">T</span></td>
<td><p>Return type of the original method, without ref modifier</p>
</td>
</tr>
</tbody>
</table>
</article>
</div>

<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=HarmonyLib_RefResult_1.md&amp;value=---%0Auid%3A%20HarmonyLib.RefResult%601%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Extras/RefResult.cs/#L5" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>

<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>

<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>

<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions docs/api/HarmonyLib.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ <h4><a class="xref" href="HarmonyLib.GetterHandler-2.html">GetterHandler&lt;T, S
</section>
<h4><a class="xref" href="HarmonyLib.InstantiationHandler-1.html">InstantiationHandler&lt;T&gt;</a></h4>
<section><p>A constructor delegate type</p>
</section>
<h4><a class="xref" href="HarmonyLib.RefResult-1.html">RefResult&lt;T&gt;</a></h4>
<section><p>Delegate type for &quot;ref return&quot; injections</p>
</section>
<h4><a class="xref" href="HarmonyLib.SetterHandler-2.html">SetterHandler&lt;T, S&gt;</a></h4>
<section><p>A setter delegate type</p>
Expand Down
3 changes: 3 additions & 0 deletions docs/api/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@
<li>
<a href="HarmonyLib.Priority.html" name="" title="Priority">Priority</a>
</li>
<li>
<a href="HarmonyLib.RefResult-1.html" name="" title="RefResult&lt;T&gt;">RefResult&lt;T&gt;</a>
</li>
<li>
<a href="HarmonyLib.ReversePatcher.html" name="" title="ReversePatcher">ReversePatcher</a>
</li>
Expand Down
2 changes: 2 additions & 0 deletions docs/articles/patching-injections.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ <h3 id="__instance">__instance</h3>
<p>Patches can use an argument called <strong><code>__instance</code></strong> to access the instance value if original method is not static. This is similar to the C# keyword <code>this</code> when used in the original method.</p>
<h3 id="__result">__result</h3>
<p>Patches can use an argument called <strong><code>__result</code></strong> to access the returned value. The type must match the return type of the original or be assignable from it. For prefixes, as the original method hasn't run yet, the value of <code>__result</code> is the default for that type. For most reference types, that would be <code>null</code>. If you wish to <strong>alter</strong> the <code>__result</code>, you need to define it <strong>by reference</strong> like <code>ref string name</code>.</p>
<h3 id="__resultref">__resultRef</h3>
<p>Patches can use an argument called <strong><code>__resultRef</code></strong> to alter the &quot;<strong>ref return</strong>&quot; reference itself. The type must be <code>RefResult&lt;T&gt;</code> by reference, where <code>T</code> must match the return type of the original, without <code>ref</code> modifier. For example <code>ref RefResult&lt;string&gt; __resultRef</code>.</p>
<h3 id="__state">__state</h3>
<p>Patches can use an argument called <strong><code>__state</code></strong> to store information in the prefix method that can be accessed again in the postfix method. Think of it as a local variable. It can be any type and you are responsible to initialize its value in the prefix. <strong>Note:</strong> It only works if both patches are defined in the same class.</p>
<h3 id="___fields">___fields</h3>
Expand Down
20 changes: 16 additions & 4 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,18 @@
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/HarmonyLib.RefResult-1.yml",
"output": {
".html": {
"relative_path": "api/HarmonyLib.RefResult-1.html",
"hash": "QxGBhK24HgUzIww7+dmsIvrjIBPUYZ+7V1XbGp/Eg68="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/HarmonyLib.ReversePatcher.yml",
Expand Down Expand Up @@ -765,7 +777,7 @@
"output": {
".html": {
"relative_path": "api/HarmonyLib.html",
"hash": "chEAxFUBf4O50TWb0MOiGTez7+bqCTkdJS7cYQenL/8="
"hash": "m7K8j2J6MgSWEe+OZF3hammvnz1O0zMYnc19/jMy1Oo="
}
},
"is_incremental": false,
Expand All @@ -789,7 +801,7 @@
"output": {
".html": {
"relative_path": "api/toc.html",
"hash": "bkstmwYuPZHXZ8+z4LOEYPQnMFMOEdr900bmSrmMta0="
"hash": "BzkGRGIidP3xJhvGaxB4UD6dXXmu+CkMbPXhDI9Hb2E="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -897,7 +909,7 @@
"output": {
".html": {
"relative_path": "articles/patching-injections.html",
"hash": "IItUeTCcUx7fqHI0K1n1yi3QQXMFwZkhq8ggMghO3t0="
"hash": "hJclnI5sjfedQKkMoywOFBpYfaTepib0PMdztKCZW7g="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -1103,7 +1115,7 @@
"ManagedReferenceDocumentProcessor": {
"can_incremental": false,
"incrementalPhase": "build",
"total_file_count": 64,
"total_file_count": 65,
"skipped_file_count": 0
},
"ResourceDocumentProcessor": {
Expand Down
9 changes: 9 additions & 0 deletions docs/xrefmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9186,6 +9186,15 @@ references:
commentId: F:HarmonyLib.Priority.VeryLow
fullName: HarmonyLib.Priority.VeryLow
nameWithType: Priority.VeryLow
- uid: HarmonyLib.RefResult`1
name: RefResult<T>
href: api/HarmonyLib.RefResult-1.html
commentId: T:HarmonyLib.RefResult`1
name.vb: RefResult(Of T)
fullName: HarmonyLib.RefResult<T>
fullName.vb: HarmonyLib.RefResult(Of T)
nameWithType: RefResult<T>
nameWithType.vb: RefResult(Of T)
- uid: HarmonyLib.ReversePatcher
name: ReversePatcher
href: api/HarmonyLib.ReversePatcher.html
Expand Down

0 comments on commit 3c257bb

Please sign in to comment.