Files
pardeike-Harmony/docs/api/HarmonyLib.AccessTools.html
Andreas Pardeike 0072943ba5 draft for docs
2025-08-23 00:31:53 +02:00

6354 lines
230 KiB
HTML

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class AccessTools
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class AccessTools
">
<meta name="generator" content="docfx 2.48.1.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.AccessTools">
<h1 id="HarmonyLib_AccessTools" data-uid="HarmonyLib.AccessTools" class="text-break">Class AccessTools
</h1>
<div class="markdown level0 summary"><p>A helper class for reflection related functions</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">AccessTools</span></div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="HarmonyLib.html">HarmonyLib</a></h6>
<h6><strong>Assembly</strong>: 0Harmony.dll</h6>
<h5 id="HarmonyLib_AccessTools_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class AccessTools</code></pre>
</div>
<h3 id="fields">Fields
</h3>
<h4 id="HarmonyLib_AccessTools_all" data-uid="HarmonyLib.AccessTools.all">all</h4>
<div class="markdown level1 summary"><p>Shortcut for <span class="xref">System.Reflection.BindingFlags</span> to simplify the use of reflections and make it work for any access level</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly BindingFlags all</code></pre>
</div>
<h5 class="fieldValue">Field Value</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">System.Reflection.BindingFlags</span></td>
<td></td>
</tr>
</tbody>
</table>
<h4 id="HarmonyLib_AccessTools_allDeclared" data-uid="HarmonyLib.AccessTools.allDeclared">allDeclared</h4>
<div class="markdown level1 summary"><p>Shortcut for <span class="xref">System.Reflection.BindingFlags</span> to simplify the use of reflections and make it work for any access level but only within the current type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly BindingFlags allDeclared</code></pre>
</div>
<h5 class="fieldValue">Field Value</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">System.Reflection.BindingFlags</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<a id="HarmonyLib_AccessTools_IsMonoRuntime_" data-uid="HarmonyLib.AccessTools.IsMonoRuntime*"></a>
<h4 id="HarmonyLib_AccessTools_IsMonoRuntime" data-uid="HarmonyLib.AccessTools.IsMonoRuntime">IsMonoRuntime</h4>
<div class="markdown level1 summary"><p>True if the current runtime is based on Mono, false otherwise (.NET)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsMonoRuntime { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</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">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsNetCoreRuntime_" data-uid="HarmonyLib.AccessTools.IsNetCoreRuntime*"></a>
<h4 id="HarmonyLib_AccessTools_IsNetCoreRuntime" data-uid="HarmonyLib.AccessTools.IsNetCoreRuntime">IsNetCoreRuntime</h4>
<div class="markdown level1 summary"><p>True if the current runtime is .NET Core, false otherwise (Mono or .NET Framework)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsNetCoreRuntime { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</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">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsNetFrameworkRuntime_" data-uid="HarmonyLib.AccessTools.IsNetFrameworkRuntime*"></a>
<h4 id="HarmonyLib_AccessTools_IsNetFrameworkRuntime" data-uid="HarmonyLib.AccessTools.IsNetFrameworkRuntime">IsNetFrameworkRuntime</h4>
<div class="markdown level1 summary"><p>True if the current runtime is .NET Framework, false otherwise (.NET Core or Mono, although latter isn't guaranteed)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsNetFrameworkRuntime { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</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">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<a id="HarmonyLib_AccessTools_ActualParameters_" data-uid="HarmonyLib.AccessTools.ActualParameters*"></a>
<h4 id="HarmonyLib_AccessTools_ActualParameters_System_Reflection_MethodBase_System_Object___" data-uid="HarmonyLib.AccessTools.ActualParameters(System.Reflection.MethodBase,System.Object[])">ActualParameters(MethodBase, Object[])</h4>
<div class="markdown level1 summary"><p>Creates an array of input parameters for a given method and a given set of potential inputs</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static object[] ActualParameters(MethodBase method, object[] inputs)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MethodBase</span></td>
<td><span class="parametername">method</span></td>
<td><p>The method/constructor you are planing to call</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Object</span>[]</td>
<td><span class="parametername">inputs</span></td>
<td><p>The possible input parameters in any order</p>
</td>
</tr>
</tbody>
</table>
<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">System.Object</span>[]</td>
<td><p>An object array matching the method signature</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_AllAssemblies_" data-uid="HarmonyLib.AccessTools.AllAssemblies*"></a>
<h4 id="HarmonyLib_AccessTools_AllAssemblies" data-uid="HarmonyLib.AccessTools.AllAssemblies">AllAssemblies()</h4>
<div class="markdown level1 summary"><p>Enumerates all assemblies in the current app domain, excluding visual studio assemblies</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IEnumerable&lt;Assembly&gt; AllAssemblies()</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">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.Reflection.Assembly</span>&gt;</td>
<td><p>An enumeration of <span class="xref">System.Reflection.Assembly</span></p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_AllTypes_" data-uid="HarmonyLib.AccessTools.AllTypes*"></a>
<h4 id="HarmonyLib_AccessTools_AllTypes" data-uid="HarmonyLib.AccessTools.AllTypes">AllTypes()</h4>
<div class="markdown level1 summary"><p>Enumerates all successfully loaded types in the current app domain, excluding visual studio assemblies</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IEnumerable&lt;Type&gt; AllTypes()</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">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.Type</span>&gt;</td>
<td><p>An enumeration of all <span class="xref">System.Type</span> in all assemblies, excluding visual studio assemblies</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_ClearTypeSearchCache_" data-uid="HarmonyLib.AccessTools.ClearTypeSearchCache*"></a>
<h4 id="HarmonyLib_AccessTools_ClearTypeSearchCache" data-uid="HarmonyLib.AccessTools.ClearTypeSearchCache">ClearTypeSearchCache()</h4>
<div class="markdown level1 summary"><p>Clears the type cache that <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_TypeSearch_System_Text_RegularExpressions_Regex_System_Boolean_">TypeSearch(Regex, Boolean)</a> uses</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void ClearTypeSearchCache()</code></pre>
</div>
<a id="HarmonyLib_AccessTools_CombinedHashCode_" data-uid="HarmonyLib.AccessTools.CombinedHashCode*"></a>
<h4 id="HarmonyLib_AccessTools_CombinedHashCode_System_Collections_Generic_IEnumerable_System_Object__" data-uid="HarmonyLib.AccessTools.CombinedHashCode(System.Collections.Generic.IEnumerable{System.Object})">CombinedHashCode(IEnumerable&lt;Object&gt;)</h4>
<div class="markdown level1 summary"><p>Calculates a combined hash code for an enumeration of objects</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static int CombinedHashCode(IEnumerable&lt;object&gt; objects)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.Object</span>&gt;</td>
<td><span class="parametername">objects</span></td>
<td><p>The objects</p>
</td>
</tr>
</tbody>
</table>
<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">System.Int32</span></td>
<td><p>The hash code</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Constructor_" data-uid="HarmonyLib.AccessTools.Constructor*"></a>
<h4 id="HarmonyLib_AccessTools_Constructor_System_Type_System_Type___System_Boolean_" data-uid="HarmonyLib.AccessTools.Constructor(System.Type,System.Type[],System.Boolean)">Constructor(Type, Type[], Boolean)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a constructor by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static ConstructorInfo Constructor(Type type, Type[] parameters = null, bool searchForStatic = false)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the constructor is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of the method</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">searchForStatic</span></td>
<td><p>Optional parameters to only consider static constructors</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.ConstructorInfo</span></td>
<td><p>A constructor info or null when type is null or when the method cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_CreateInstance_" data-uid="HarmonyLib.AccessTools.CreateInstance*"></a>
<h4 id="HarmonyLib_AccessTools_CreateInstance_System_Type_" data-uid="HarmonyLib.AccessTools.CreateInstance(System.Type)">CreateInstance(Type)</h4>
<div class="markdown level1 summary"><p>Creates an (possibly uninitialized) instance of a given type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static object CreateInstance(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Object</span></td>
<td><p>The new instance</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_CreateInstance_" data-uid="HarmonyLib.AccessTools.CreateInstance*"></a>
<h4 id="HarmonyLib_AccessTools_CreateInstance__1" data-uid="HarmonyLib.AccessTools.CreateInstance``1">CreateInstance&lt;T&gt;()</h4>
<div class="markdown level1 summary"><p>Creates an (possibly uninitialized) instance of a given type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static T CreateInstance&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><p>The new instance</p>
</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>The class/type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredConstructor_" data-uid="HarmonyLib.AccessTools.DeclaredConstructor*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredConstructor_System_Type_System_Type___System_Boolean_" data-uid="HarmonyLib.AccessTools.DeclaredConstructor(System.Type,System.Type[],System.Boolean)">DeclaredConstructor(Type, Type[], Boolean)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared constructor</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static ConstructorInfo DeclaredConstructor(Type type, Type[] parameters = null, bool searchForStatic = false)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the constructor is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of the constructor</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">searchForStatic</span></td>
<td><p>Optional parameters to only consider static constructors</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.ConstructorInfo</span></td>
<td><p>A constructor info or null when type is null or when the constructor cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredEvent_" data-uid="HarmonyLib.AccessTools.DeclaredEvent*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredEvent_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredEvent(System.String)">DeclaredEvent(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared event</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static EventInfo DeclaredEvent(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.EventInfo</span></td>
<td><p>An event or null when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredEvent_" data-uid="HarmonyLib.AccessTools.DeclaredEvent*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredEvent_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredEvent(System.Type,System.String)">DeclaredEvent(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared event</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static EventInfo DeclaredEvent(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the event is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the event (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.EventInfo</span></td>
<td><p>An event or null when type/name is null or when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredEventAdder_" data-uid="HarmonyLib.AccessTools.DeclaredEventAdder*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredEventAdder_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredEventAdder(System.String)">DeclaredEventAdder(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the add method of a directly declared event</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredEventAdder(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredEventAdder_" data-uid="HarmonyLib.AccessTools.DeclaredEventAdder*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredEventAdder_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredEventAdder(System.Type,System.String)">DeclaredEventAdder(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the add method of a directly declared event</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredEventAdder(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the event is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the event (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredEventRemover_" data-uid="HarmonyLib.AccessTools.DeclaredEventRemover*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredEventRemover_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredEventRemover(System.String)">DeclaredEventRemover(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the remove method of a directly declared event</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredEventRemover(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredEventRemover_" data-uid="HarmonyLib.AccessTools.DeclaredEventRemover*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredEventRemover_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredEventRemover(System.Type,System.String)">DeclaredEventRemover(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the remove method of a directly declared event</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredEventRemover(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the event is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the event (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredField_" data-uid="HarmonyLib.AccessTools.DeclaredField*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredField_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredField(System.String)">DeclaredField(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared field</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FieldInfo DeclaredField(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.FieldInfo</span></td>
<td><p>A field or null when the field cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredField_" data-uid="HarmonyLib.AccessTools.DeclaredField*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredField_System_Type_System_Int32_" data-uid="HarmonyLib.AccessTools.DeclaredField(System.Type,System.Int32)">DeclaredField(Type, Int32)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a field</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FieldInfo DeclaredField(Type type, int idx)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the field is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">idx</span></td>
<td><p>The zero-based index of the field inside the class definition</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.FieldInfo</span></td>
<td><p>A field or null when type is null or when the field cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredField_" data-uid="HarmonyLib.AccessTools.DeclaredField*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredField_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredField(System.Type,System.String)">DeclaredField(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared field</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FieldInfo DeclaredField(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the field is defined</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.FieldInfo</span></td>
<td><p>A field or null when type/name is null or when the field cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredFinalizer_" data-uid="HarmonyLib.AccessTools.DeclaredFinalizer*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredFinalizer_System_Type_" data-uid="HarmonyLib.AccessTools.DeclaredFinalizer(System.Type)">DeclaredFinalizer(Type)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared finalizer</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredFinalizer(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type that defines the finalizer</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type is null or when the finalizer cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredIndexer_" data-uid="HarmonyLib.AccessTools.DeclaredIndexer*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredIndexer_System_Type_System_Type___" data-uid="HarmonyLib.AccessTools.DeclaredIndexer(System.Type,System.Type[])">DeclaredIndexer(Type, Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared indexer property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo DeclaredIndexer(Type type, Type[] parameters = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the indexer property is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of multiple indexers</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>An indexer property or null when type is null or when it cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredIndexerGetter_" data-uid="HarmonyLib.AccessTools.DeclaredIndexerGetter*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredIndexerGetter_System_Type_System_Type___" data-uid="HarmonyLib.AccessTools.DeclaredIndexerGetter(System.Type,System.Type[])">DeclaredIndexerGetter(Type, Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the getter method of a directly declared indexer property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredIndexerGetter(Type type, Type[] parameters = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the indexer property is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of multiple indexers</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type is null or when indexer property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredIndexerSetter_" data-uid="HarmonyLib.AccessTools.DeclaredIndexerSetter*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredIndexerSetter_System_Type_System_Type___" data-uid="HarmonyLib.AccessTools.DeclaredIndexerSetter(System.Type,System.Type[])">DeclaredIndexerSetter(Type, Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the setter method of a directly declared indexer property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredIndexerSetter(Type type, Type[] parameters)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the indexer property is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of multiple indexers</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type is null or when indexer property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredMethod_" data-uid="HarmonyLib.AccessTools.DeclaredMethod*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredMethod_System_String_System_Type___System_Type___" data-uid="HarmonyLib.AccessTools.DeclaredMethod(System.String,System.Type[],System.Type[])">DeclaredMethod(String, Type[], Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredMethod(string typeColonName, Type[] parameters = null, Type[] generics = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of the method</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">generics</span></td>
<td><p>Optional list of types that define the generic version of the method</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the method cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredMethod_" data-uid="HarmonyLib.AccessTools.DeclaredMethod*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredMethod_System_Type_System_String_System_Type___System_Type___" data-uid="HarmonyLib.AccessTools.DeclaredMethod(System.Type,System.String,System.Type[],System.Type[])">DeclaredMethod(Type, String, Type[], Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredMethod(Type type, string name, Type[] parameters = null, Type[] generics = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the method is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the method (case sensitive)</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of the method</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">generics</span></td>
<td><p>Optional list of types that define the generic version of the method</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the method cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredProperty_" data-uid="HarmonyLib.AccessTools.DeclaredProperty*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredProperty_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredProperty(System.String)">DeclaredProperty(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo DeclaredProperty(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>A property or null when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredProperty_" data-uid="HarmonyLib.AccessTools.DeclaredProperty*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredProperty_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredProperty(System.Type,System.String)">DeclaredProperty(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a directly declared property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo DeclaredProperty(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the property is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the property (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>A property or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredPropertyGetter_" data-uid="HarmonyLib.AccessTools.DeclaredPropertyGetter*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredPropertyGetter_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredPropertyGetter(System.String)">DeclaredPropertyGetter(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the getter method of a directly declared property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredPropertyGetter(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredPropertyGetter_" data-uid="HarmonyLib.AccessTools.DeclaredPropertyGetter*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredPropertyGetter_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredPropertyGetter(System.Type,System.String)">DeclaredPropertyGetter(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the getter method of a directly declared property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredPropertyGetter(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the property is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the property (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredPropertySetter_" data-uid="HarmonyLib.AccessTools.DeclaredPropertySetter*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredPropertySetter_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredPropertySetter(System.String)">DeclaredPropertySetter(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the Setter method of a directly declared property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredPropertySetter(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_DeclaredPropertySetter_" data-uid="HarmonyLib.AccessTools.DeclaredPropertySetter*"></a>
<h4 id="HarmonyLib_AccessTools_DeclaredPropertySetter_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.DeclaredPropertySetter(System.Type,System.String)">DeclaredPropertySetter(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the setter method of a directly declared property</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo DeclaredPropertySetter(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the property is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the property (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_EnumeratorMoveNext_" data-uid="HarmonyLib.AccessTools.EnumeratorMoveNext*"></a>
<h4 id="HarmonyLib_AccessTools_EnumeratorMoveNext_System_Reflection_MethodBase_" data-uid="HarmonyLib.AccessTools.EnumeratorMoveNext(System.Reflection.MethodBase)">EnumeratorMoveNext(MethodBase)</h4>
<div class="markdown level1 summary"><p>Gets the <span class="xref">System.Collections.IEnumerator.MoveNext</span> method of an enumerator method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo EnumeratorMoveNext(MethodBase method)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MethodBase</span></td>
<td><span class="parametername">method</span></td>
<td><p>Enumerator method that creates the enumerator <span class="xref">System.Collections.IEnumerator</span></p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>The internal <span class="xref">System.Collections.IEnumerator.MoveNext</span> method of the enumerator or <strong>null</strong> if no valid enumerator is detected</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Event_" data-uid="HarmonyLib.AccessTools.Event*"></a>
<h4 id="HarmonyLib_AccessTools_Event_System_String_" data-uid="HarmonyLib.AccessTools.Event(System.String)">Event(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for an event by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static EventInfo Event(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.EventInfo</span></td>
<td><p>An event or null when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Event_" data-uid="HarmonyLib.AccessTools.Event*"></a>
<h4 id="HarmonyLib_AccessTools_Event_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.Event(System.Type,System.String)">Event(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for an event by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static EventInfo Event(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the event is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the event (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.EventInfo</span></td>
<td><p>An event or null when type/name is null or when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_EventAdder_" data-uid="HarmonyLib.AccessTools.EventAdder*"></a>
<h4 id="HarmonyLib_AccessTools_EventAdder_System_String_" data-uid="HarmonyLib.AccessTools.EventAdder(System.String)">EventAdder(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the add method of an event by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo EventAdder(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_EventAdder_" data-uid="HarmonyLib.AccessTools.EventAdder*"></a>
<h4 id="HarmonyLib_AccessTools_EventAdder_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.EventAdder(System.Type,System.String)">EventAdder(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the add method of an event by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo EventAdder(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the event is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the event (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_EventRemover_" data-uid="HarmonyLib.AccessTools.EventRemover*"></a>
<h4 id="HarmonyLib_AccessTools_EventRemover_System_String_" data-uid="HarmonyLib.AccessTools.EventRemover(System.String)">EventRemover(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the remove method of an event by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo EventRemover(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_EventRemover_" data-uid="HarmonyLib.AccessTools.EventRemover*"></a>
<h4 id="HarmonyLib_AccessTools_EventRemover_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.EventRemover(System.Type,System.String)">EventRemover(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the remove method of an event by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo EventRemover(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the event is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the event (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the event cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Field_" data-uid="HarmonyLib.AccessTools.Field*"></a>
<h4 id="HarmonyLib_AccessTools_Field_System_String_" data-uid="HarmonyLib.AccessTools.Field(System.String)">Field(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a field by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FieldInfo Field(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.FieldInfo</span></td>
<td><p>A field or null when the field cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Field_" data-uid="HarmonyLib.AccessTools.Field*"></a>
<h4 id="HarmonyLib_AccessTools_Field_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.Field(System.Type,System.String)">Field(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a field by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FieldInfo Field(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the field is defined</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the field (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.FieldInfo</span></td>
<td><p>A field or null when type/name is null or when the field cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FieldRefAccess_" data-uid="HarmonyLib.AccessTools.FieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_FieldRefAccess__1_System_String_" data-uid="HarmonyLib.AccessTools.FieldRefAccess``1(System.String)">FieldRefAccess&lt;F&gt;(String)</h4>
<div class="markdown level1 summary"><p>Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.FieldRef&lt;object, F&gt; FieldRefAccess&lt;F&gt;(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef</a>&lt;<span class="xref">System.Object</span>, F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef&lt;T, F&gt;</a> delegate with <code>T=object</code></p>
</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">F</span></td>
<td><p>type of the field</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FieldRefAccess_" data-uid="HarmonyLib.AccessTools.FieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_FieldRefAccess__1_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.FieldRefAccess``1(System.Type,System.String)">FieldRefAccess&lt;F&gt;(Type, String)</h4>
<div class="markdown level1 summary"><p>Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.FieldRef&lt;object, F&gt; FieldRefAccess&lt;F&gt;(Type type, string fieldName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type that defines the field, or derived class of this type; must not be a struct type unless the field is static</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef</a>&lt;<span class="xref">System.Object</span>, F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef&lt;T, F&gt;</a> delegate with <code>T=object</code>
(for static fields, the <code>instance</code> delegate parameter is ignored)</p>
</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">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_FieldRefAccess__1_System_Type_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for cases where the given type is only known at runtime and thus can&apos;t be used as a type parameter <code>T</code>
in e.g. <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_FieldRefAccess__2_System_String_">FieldRefAccess&lt;T, F&gt;(String)</a>.
</p>
<p>
This method supports static fields, even those defined in structs, for legacy reasons.
Consider using <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_StaticFieldRefAccess__1_System_Type_System_String_">StaticFieldRefAccess&lt;F&gt;(Type, String)</a> (and other overloads) instead for static fields.
</p>
</div>
<a id="HarmonyLib_AccessTools_FieldRefAccess_" data-uid="HarmonyLib.AccessTools.FieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_FieldRefAccess__2___0_System_Reflection_FieldInfo_" data-uid="HarmonyLib.AccessTools.FieldRefAccess``2(``0,System.Reflection.FieldInfo)">FieldRefAccess&lt;T, F&gt;(T, FieldInfo)</h4>
<div class="markdown level1 summary"><p>Creates a field reference for an instance field of a class</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F FieldRefAccess&lt;T, F&gt;(T instance, FieldInfo fieldInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">instance</span></td>
<td><p>The instance</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Reflection.FieldInfo</span></td>
<td><span class="parametername">fieldInfo</span></td>
<td><p>The field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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>The type that defines the field; or a parent class (including <span class="xref">System.Object</span>), implemented interface, or derived class of this type
(&quot;<code>instanceOfT is FieldDeclaringType</code>&quot; must be possible)</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_FieldRefAccess__2___0_System_Reflection_FieldInfo__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for one-off access to a field&apos;s value for a single instance and where the field has already been obtained.
If you need to access a field&apos;s value for potentially multiple instances, use <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_FieldRefAccess__2_System_Reflection_FieldInfo_">FieldRefAccess&lt;T, F&gt;(FieldInfo)</a> instead.
<code>FieldRefAccess&lt;T, F>(instance, fieldInfo)</code> is functionally equivalent to <code>FieldRefAccess&lt;T, F>(fieldInfo)(instance)</code>.
</p>
<p>
For backwards compatibility, there is no class constraint on <code data-dev-comment-type="typeparamref" class="typeparamref">T</code>.
Instead, the non-value-type check is done at runtime within the method.
</p>
</div>
<a id="HarmonyLib_AccessTools_FieldRefAccess_" data-uid="HarmonyLib.AccessTools.FieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_FieldRefAccess__2___0_System_String_" data-uid="HarmonyLib.AccessTools.FieldRefAccess``2(``0,System.String)">FieldRefAccess&lt;T, F&gt;(T, String)</h4>
<div class="markdown level1 summary"><p>Creates an instance field reference for a specific instance of a class</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F FieldRefAccess&lt;T, F&gt;(T instance, string fieldName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">instance</span></td>
<td><p>The instance</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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>The class that defines the instance field, or derived class of this type</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_FieldRefAccess__2___0_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for one-off access to a field&apos;s value for a single instance.
If you need to access a field&apos;s value for potentially multiple instances, use <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_FieldRefAccess__2_System_String_">FieldRefAccess&lt;T, F&gt;(String)</a> instead.
<code>FieldRefAccess&lt;T, F>(instance, fieldName)</code> is functionally equivalent to <code>FieldRefAccess&lt;T, F>(fieldName)(instance)</code>.
</p>
<p>
For backwards compatibility, there is no class constraint on <code data-dev-comment-type="typeparamref" class="typeparamref">T</code>.
Instead, the non-value-type check is done at runtime within the method.
</p>
</div>
<a id="HarmonyLib_AccessTools_FieldRefAccess_" data-uid="HarmonyLib.AccessTools.FieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_FieldRefAccess__2_System_Reflection_FieldInfo_" data-uid="HarmonyLib.AccessTools.FieldRefAccess``2(System.Reflection.FieldInfo)">FieldRefAccess&lt;T, F&gt;(FieldInfo)</h4>
<div class="markdown level1 summary"><p>Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.FieldRef&lt;T, F&gt; FieldRefAccess&lt;T, F&gt;(FieldInfo fieldInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.FieldInfo</span></td>
<td><span class="parametername">fieldInfo</span></td>
<td><p>The field</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef</a>&lt;T, F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef&lt;T, F&gt;</a> delegate</p>
</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>An arbitrary type if the field is static; otherwise the class that defines the field, or a parent class (including <span class="xref">System.Object</span>),
implemented interface, or derived class of this type (&quot;<code>instanceOfT is FieldDeclaringType</code>&quot; must be possible)</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_FieldRefAccess__2_System_Reflection_FieldInfo__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for cases where the field has already been obtained, avoiding the field searching cost in
e.g. <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_FieldRefAccess__2_System_String_">FieldRefAccess&lt;T, F&gt;(String)</a>.
</p>
<p>
This method supports static fields, even those defined in structs, for legacy reasons.
For such static fields, <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> is effectively ignored.
Consider using <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_StaticFieldRefAccess__2_System_Reflection_FieldInfo_">StaticFieldRefAccess&lt;T, F&gt;(FieldInfo)</a> (and other overloads) instead for static fields.
</p>
<p>
For backwards compatibility, there is no class constraint on <code data-dev-comment-type="typeparamref" class="typeparamref">T</code>.
Instead, the non-value-type check is done at runtime within the method.
</p>
</div>
<a id="HarmonyLib_AccessTools_FieldRefAccess_" data-uid="HarmonyLib.AccessTools.FieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_FieldRefAccess__2_System_String_" data-uid="HarmonyLib.AccessTools.FieldRefAccess``2(System.String)">FieldRefAccess&lt;T, F&gt;(String)</h4>
<div class="markdown level1 summary"><p>Creates a field reference delegate for an instance field of a class</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.FieldRef&lt;T, F&gt; FieldRefAccess&lt;T, F&gt;(string fieldName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef</a>&lt;T, F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.FieldRef-2.html">AccessTools.FieldRef&lt;T, F&gt;</a> delegate</p>
</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>The class that defines the instance field, or derived class of this type</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_FieldRefAccess__2_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
For backwards compatibility, there is no class constraint on <code data-dev-comment-type="typeparamref" class="typeparamref">T</code>.
Instead, the non-value-type check is done at runtime within the method.
</p>
</div>
<a id="HarmonyLib_AccessTools_Finalizer_" data-uid="HarmonyLib.AccessTools.Finalizer*"></a>
<h4 id="HarmonyLib_AccessTools_Finalizer_System_Type_" data-uid="HarmonyLib.AccessTools.Finalizer(System.Type)">Finalizer(Type)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a finalizer</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo Finalizer(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type that defines the finalizer</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type is null or when the finalizer cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FindIncludingBaseTypes_" data-uid="HarmonyLib.AccessTools.FindIncludingBaseTypes*"></a>
<h4 id="HarmonyLib_AccessTools_FindIncludingBaseTypes__1_System_Type_System_Func_System_Type___0__" data-uid="HarmonyLib.AccessTools.FindIncludingBaseTypes``1(System.Type,System.Func{System.Type,``0})">FindIncludingBaseTypes&lt;T&gt;(Type, Func&lt;Type, T&gt;)</h4>
<div class="markdown level1 summary"><p>Applies a function going up the type hierarchy and stops at the first non-<code>null</code> result</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static T FindIncludingBaseTypes&lt;T&gt;(Type type, Func&lt;Type, T&gt; func)
where T : class</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start with</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.Type</span>, T&gt;</td>
<td><span class="parametername">func</span></td>
<td><p>The evaluation function returning T</p>
</td>
</tr>
</tbody>
</table>
<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><p>The first non-<code>null</code> result, or <code>null</code> if no match</p>
</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>Result type of func()</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_FindIncludingBaseTypes__1_System_Type_System_Func_System_Type___0___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The type hierarchy of a class or value type (including struct) does NOT include implemented interfaces,
and the type hierarchy of an interface is only itself (regardless of whether that interface implements other interfaces).
The top-most type in the type hierarchy of all non-interface types (including value types) is <span class="xref">System.Object</span>.</p>
</div>
<a id="HarmonyLib_AccessTools_FindIncludingInnerTypes_" data-uid="HarmonyLib.AccessTools.FindIncludingInnerTypes*"></a>
<h4 id="HarmonyLib_AccessTools_FindIncludingInnerTypes__1_System_Type_System_Func_System_Type___0__" data-uid="HarmonyLib.AccessTools.FindIncludingInnerTypes``1(System.Type,System.Func{System.Type,``0})">FindIncludingInnerTypes&lt;T&gt;(Type, Func&lt;Type, T&gt;)</h4>
<div class="markdown level1 summary"><p>Applies a function going into inner types and stops at the first non-<code>null</code> result</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static T FindIncludingInnerTypes&lt;T&gt;(Type type, Func&lt;Type, T&gt; func)
where T : class</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start with</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.Type</span>, T&gt;</td>
<td><span class="parametername">func</span></td>
<td><p>The evaluation function returning T</p>
</td>
</tr>
</tbody>
</table>
<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><p>The first non-<code>null</code> result, or <code>null</code> if no match</p>
</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>Generic type parameter</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FirstConstructor_" data-uid="HarmonyLib.AccessTools.FirstConstructor*"></a>
<h4 id="HarmonyLib_AccessTools_FirstConstructor_System_Type_System_Func_System_Reflection_ConstructorInfo_System_Boolean__" data-uid="HarmonyLib.AccessTools.FirstConstructor(System.Type,System.Func{System.Reflection.ConstructorInfo,System.Boolean})">FirstConstructor(Type, Func&lt;ConstructorInfo, Boolean&gt;)</h4>
<div class="markdown level1 summary"><p>Given a type, returns the first constructor matching a predicate</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static ConstructorInfo FirstConstructor(Type type, Func&lt;ConstructorInfo, bool&gt; predicate)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start searching at</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.Reflection.ConstructorInfo</span>, <span class="xref">System.Boolean</span>&gt;</td>
<td><span class="parametername">predicate</span></td>
<td><p>The predicate to search with</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.ConstructorInfo</span></td>
<td><p>The constructor info or null if type/predicate is null or if a type with that name cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FirstInner_" data-uid="HarmonyLib.AccessTools.FirstInner*"></a>
<h4 id="HarmonyLib_AccessTools_FirstInner_System_Type_System_Func_System_Type_System_Boolean__" data-uid="HarmonyLib.AccessTools.FirstInner(System.Type,System.Func{System.Type,System.Boolean})">FirstInner(Type, Func&lt;Type, Boolean&gt;)</h4>
<div class="markdown level1 summary"><p>Given a type, returns the first inner type matching a recursive search with a predicate</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type FirstInner(Type type, Func&lt;Type, bool&gt; predicate)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start searching at</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.Type</span>, <span class="xref">System.Boolean</span>&gt;</td>
<td><span class="parametername">predicate</span></td>
<td><p>The predicate to search with</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span></td>
<td><p>The inner type or null if type/predicate is null or if a type with that name cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FirstMethod_" data-uid="HarmonyLib.AccessTools.FirstMethod*"></a>
<h4 id="HarmonyLib_AccessTools_FirstMethod_System_Type_System_Func_System_Reflection_MethodInfo_System_Boolean__" data-uid="HarmonyLib.AccessTools.FirstMethod(System.Type,System.Func{System.Reflection.MethodInfo,System.Boolean})">FirstMethod(Type, Func&lt;MethodInfo, Boolean&gt;)</h4>
<div class="markdown level1 summary"><p>Given a type, returns the first method matching a predicate</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo FirstMethod(Type type, Func&lt;MethodInfo, bool&gt; predicate)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start searching at</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.Reflection.MethodInfo</span>, <span class="xref">System.Boolean</span>&gt;</td>
<td><span class="parametername">predicate</span></td>
<td><p>The predicate to search with</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>The method or null if type/predicate is null or if a type with that name cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_FirstProperty_" data-uid="HarmonyLib.AccessTools.FirstProperty*"></a>
<h4 id="HarmonyLib_AccessTools_FirstProperty_System_Type_System_Func_System_Reflection_PropertyInfo_System_Boolean__" data-uid="HarmonyLib.AccessTools.FirstProperty(System.Type,System.Func{System.Reflection.PropertyInfo,System.Boolean})">FirstProperty(Type, Func&lt;PropertyInfo, Boolean&gt;)</h4>
<div class="markdown level1 summary"><p>Given a type, returns the first property matching a predicate</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo FirstProperty(Type type, Func&lt;PropertyInfo, bool&gt; predicate)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start searching at</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.Reflection.PropertyInfo</span>, <span class="xref">System.Boolean</span>&gt;</td>
<td><span class="parametername">predicate</span></td>
<td><p>The predicate to search with</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>The property or null if type/predicate is null or if a type with that name cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetDeclaredConstructors_" data-uid="HarmonyLib.AccessTools.GetDeclaredConstructors*"></a>
<h4 id="HarmonyLib_AccessTools_GetDeclaredConstructors_System_Type_System_Nullable_System_Boolean__" data-uid="HarmonyLib.AccessTools.GetDeclaredConstructors(System.Type,System.Nullable{System.Boolean})">GetDeclaredConstructors(Type, Nullable&lt;Boolean&gt;)</h4>
<div class="markdown level1 summary"><p>Gets reflection information for all declared constructors</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;ConstructorInfo&gt; GetDeclaredConstructors(Type type, bool? searchForStatic = default(bool? ))</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the constructors are declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Nullable</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
<td><span class="parametername">searchForStatic</span></td>
<td><p>Optional parameters to only consider static constructors</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.Reflection.ConstructorInfo</span>&gt;</td>
<td><p>A list of constructor infos</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetDeclaredFields_" data-uid="HarmonyLib.AccessTools.GetDeclaredFields*"></a>
<h4 id="HarmonyLib_AccessTools_GetDeclaredFields_System_Type_" data-uid="HarmonyLib.AccessTools.GetDeclaredFields(System.Type)">GetDeclaredFields(Type)</h4>
<div class="markdown level1 summary"><p>Gets reflection information for all declared fields</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;FieldInfo&gt; GetDeclaredFields(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the fields are declared</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.Reflection.FieldInfo</span>&gt;</td>
<td><p>A list of fields</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetDeclaredMember_" data-uid="HarmonyLib.AccessTools.GetDeclaredMember*"></a>
<h4 id="HarmonyLib_AccessTools_GetDeclaredMember__1___0_" data-uid="HarmonyLib.AccessTools.GetDeclaredMember``1(``0)">GetDeclaredMember&lt;T&gt;(T)</h4>
<div class="markdown level1 summary"><p>Gets the real implementation of a class member</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static T GetDeclaredMember&lt;T&gt;(this T member)
where T : MemberInfo</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">member</span></td>
<td><p>A member</p>
</td>
</tr>
</tbody>
</table>
<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><p>The member itself if its declared. Otherwise the member that is actually implemented in some base type</p>
</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></td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetDeclaredMethods_" data-uid="HarmonyLib.AccessTools.GetDeclaredMethods*"></a>
<h4 id="HarmonyLib_AccessTools_GetDeclaredMethods_System_Type_" data-uid="HarmonyLib.AccessTools.GetDeclaredMethods(System.Type)">GetDeclaredMethods(Type)</h4>
<div class="markdown level1 summary"><p>Gets reflection information for all declared methods</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;MethodInfo&gt; GetDeclaredMethods(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the methods are declared</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.Reflection.MethodInfo</span>&gt;</td>
<td><p>A list of methods</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetDeclaredProperties_" data-uid="HarmonyLib.AccessTools.GetDeclaredProperties*"></a>
<h4 id="HarmonyLib_AccessTools_GetDeclaredProperties_System_Type_" data-uid="HarmonyLib.AccessTools.GetDeclaredProperties(System.Type)">GetDeclaredProperties(Type)</h4>
<div class="markdown level1 summary"><p>Gets reflection information for all declared properties</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;PropertyInfo&gt; GetDeclaredProperties(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the properties are declared</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.Reflection.PropertyInfo</span>&gt;</td>
<td><p>A list of properties</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetDefaultValue_" data-uid="HarmonyLib.AccessTools.GetDefaultValue*"></a>
<h4 id="HarmonyLib_AccessTools_GetDefaultValue_System_Type_" data-uid="HarmonyLib.AccessTools.GetDefaultValue(System.Type)">GetDefaultValue(Type)</h4>
<div class="markdown level1 summary"><p>Gets default value for a specific type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static object GetDefaultValue(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Object</span></td>
<td><p>The default value</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetFieldNames_" data-uid="HarmonyLib.AccessTools.GetFieldNames*"></a>
<h4 id="HarmonyLib_AccessTools_GetFieldNames_System_Object_" data-uid="HarmonyLib.AccessTools.GetFieldNames(System.Object)">GetFieldNames(Object)</h4>
<div class="markdown level1 summary"><p>Gets the names of all fields that are declared in the type of the instance</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;string&gt; GetFieldNames(object instance)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">instance</span></td>
<td><p>An instance of the type to search in</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><p>A list of field names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetFieldNames_" data-uid="HarmonyLib.AccessTools.GetFieldNames*"></a>
<h4 id="HarmonyLib_AccessTools_GetFieldNames_System_Type_" data-uid="HarmonyLib.AccessTools.GetFieldNames(System.Type)">GetFieldNames(Type)</h4>
<div class="markdown level1 summary"><p>Gets the names of all fields that are declared in a type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;string&gt; GetFieldNames(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The declaring class/type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><p>A list of field names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetMethodByModuleAndToken_" data-uid="HarmonyLib.AccessTools.GetMethodByModuleAndToken*"></a>
<h4 id="HarmonyLib_AccessTools_GetMethodByModuleAndToken_System_String_System_Int32_" data-uid="HarmonyLib.AccessTools.GetMethodByModuleAndToken(System.String,System.Int32)">GetMethodByModuleAndToken(String, Int32)</h4>
<div class="markdown level1 summary"><p>Returns a <span class="xref">System.Reflection.MethodInfo</span> by searching for module-id and token</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo GetMethodByModuleAndToken(string moduleGUID, int token)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">moduleGUID</span></td>
<td><p>The module of the method</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">token</span></td>
<td><p>The token of the method</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetMethodNames_" data-uid="HarmonyLib.AccessTools.GetMethodNames*"></a>
<h4 id="HarmonyLib_AccessTools_GetMethodNames_System_Object_" data-uid="HarmonyLib.AccessTools.GetMethodNames(System.Object)">GetMethodNames(Object)</h4>
<div class="markdown level1 summary"><p>Gets the names of all method that are declared in the type of the instance</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;string&gt; GetMethodNames(object instance)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">instance</span></td>
<td><p>An instance of the type to search in</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><p>A list of method names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetMethodNames_" data-uid="HarmonyLib.AccessTools.GetMethodNames*"></a>
<h4 id="HarmonyLib_AccessTools_GetMethodNames_System_Type_" data-uid="HarmonyLib.AccessTools.GetMethodNames(System.Type)">GetMethodNames(Type)</h4>
<div class="markdown level1 summary"><p>Gets the names of all method that are declared in a type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;string&gt; GetMethodNames(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The declaring class/type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><p>A list of method names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetOutsideCaller_" data-uid="HarmonyLib.AccessTools.GetOutsideCaller*"></a>
<h4 id="HarmonyLib_AccessTools_GetOutsideCaller" data-uid="HarmonyLib.AccessTools.GetOutsideCaller">GetOutsideCaller()</h4>
<div class="markdown level1 summary"><p>Returns who called the current method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodBase GetOutsideCaller()</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">System.Reflection.MethodBase</span></td>
<td><p>The calling method/constructor (excluding the caller)</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetPropertyNames_" data-uid="HarmonyLib.AccessTools.GetPropertyNames*"></a>
<h4 id="HarmonyLib_AccessTools_GetPropertyNames_System_Object_" data-uid="HarmonyLib.AccessTools.GetPropertyNames(System.Object)">GetPropertyNames(Object)</h4>
<div class="markdown level1 summary"><p>Gets the names of all properties that are declared in the type of the instance</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;string&gt; GetPropertyNames(object instance)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">instance</span></td>
<td><p>An instance of the type to search in</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><p>A list of property names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetPropertyNames_" data-uid="HarmonyLib.AccessTools.GetPropertyNames*"></a>
<h4 id="HarmonyLib_AccessTools_GetPropertyNames_System_Type_" data-uid="HarmonyLib.AccessTools.GetPropertyNames(System.Type)">GetPropertyNames(Type)</h4>
<div class="markdown level1 summary"><p>Gets the names of all properties that are declared in a type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;string&gt; GetPropertyNames(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The declaring class/type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.List</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><p>A list of property names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetReturnedType_" data-uid="HarmonyLib.AccessTools.GetReturnedType*"></a>
<h4 id="HarmonyLib_AccessTools_GetReturnedType_System_Reflection_MethodBase_" data-uid="HarmonyLib.AccessTools.GetReturnedType(System.Reflection.MethodBase)">GetReturnedType(MethodBase)</h4>
<div class="markdown level1 summary"><p>Gets the return type of a method or constructor</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type GetReturnedType(MethodBase methodOrConstructor)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MethodBase</span></td>
<td><span class="parametername">methodOrConstructor</span></td>
<td><p>The method/constructor</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span></td>
<td><p>The return type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetTypes_" data-uid="HarmonyLib.AccessTools.GetTypes*"></a>
<h4 id="HarmonyLib_AccessTools_GetTypes_System_Object___" data-uid="HarmonyLib.AccessTools.GetTypes(System.Object[])">GetTypes(Object[])</h4>
<div class="markdown level1 summary"><p>Returns an array containing the type of each object in the given array</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type[] GetTypes(object[] parameters)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>An array of objects</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span>[]</td>
<td><p>An array of types or an empty array if parameters is null (if an object is null, the type for it will be object)</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_GetTypesFromAssembly_" data-uid="HarmonyLib.AccessTools.GetTypesFromAssembly*"></a>
<h4 id="HarmonyLib_AccessTools_GetTypesFromAssembly_System_Reflection_Assembly_" data-uid="HarmonyLib.AccessTools.GetTypesFromAssembly(System.Reflection.Assembly)">GetTypesFromAssembly(Assembly)</h4>
<div class="markdown level1 summary"><p>Gets all successfully loaded types from a given assembly</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type[] GetTypesFromAssembly(Assembly assembly)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.Assembly</span></td>
<td><span class="parametername">assembly</span></td>
<td><p>The assembly</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span>[]</td>
<td><p>An array of types</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_GetTypesFromAssembly_System_Reflection_Assembly__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This calls and returns <span class="xref">System.Reflection.Assembly.GetTypes</span>, while catching any thrown <span class="xref">System.Reflection.ReflectionTypeLoadException</span>.
If such an exception is thrown, returns the successfully loaded types (<span class="xref">System.Reflection.ReflectionTypeLoadException.Types</span>,
filtered for non-null values).</p>
</div>
<a id="HarmonyLib_AccessTools_GetUnderlyingType_" data-uid="HarmonyLib.AccessTools.GetUnderlyingType*"></a>
<h4 id="HarmonyLib_AccessTools_GetUnderlyingType_System_Reflection_MemberInfo_" data-uid="HarmonyLib.AccessTools.GetUnderlyingType(System.Reflection.MemberInfo)">GetUnderlyingType(MemberInfo)</h4>
<div class="markdown level1 summary"><p>Gets the type of any class member of</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type GetUnderlyingType(this MemberInfo member)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MemberInfo</span></td>
<td><span class="parametername">member</span></td>
<td><p>A member</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span></td>
<td><p>The class/type of this member</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_HarmonyDelegate_" data-uid="HarmonyLib.AccessTools.HarmonyDelegate*"></a>
<h4 id="HarmonyLib_AccessTools_HarmonyDelegate__1_System_Object_" data-uid="HarmonyLib.AccessTools.HarmonyDelegate``1(System.Object)">HarmonyDelegate&lt;DelegateType&gt;(Object)</h4>
<div class="markdown level1 summary"><p>Creates a delegate for a given delegate definition, attributed with [<a class="xref" href="HarmonyLib.HarmonyDelegate.html">HarmonyDelegate</a>]</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static DelegateType HarmonyDelegate&lt;DelegateType&gt;(object instance = null)
where DelegateType : Delegate</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">instance</span></td>
<td><p>Only applies for instance methods. If <code>null</code> (default), returned delegate is an open (a.k.a. unbound) instance delegate
where an instance is supplied as the first argument to the delegate invocation; else, delegate is a closed (a.k.a. bound)
instance delegate where the delegate invocation always applies to the given <code data-dev-comment-type="paramref" class="paramref">instance</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">DelegateType</span></td>
<td><p>A delegate of given <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> to the method specified via [<a class="xref" href="HarmonyLib.HarmonyDelegate.html">HarmonyDelegate</a>]
attributes on <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code></p>
</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">DelegateType</span></td>
<td><p>The delegate Type, attributed with [<a class="xref" href="HarmonyLib.HarmonyDelegate.html">HarmonyDelegate</a>]</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_HarmonyDelegate__1_System_Object__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This calls <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_MethodDelegate__1_System_Reflection_MethodInfo_System_Object_System_Boolean_System_Type___">MethodDelegate&lt;DelegateType&gt;(MethodInfo, Object, Boolean, Type[])</a> with the <code>method</code> and <code>virtualCall</code> arguments
determined from the [<a class="xref" href="HarmonyLib.HarmonyDelegate.html">HarmonyDelegate</a>] attributes on <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code>,
and the given <code data-dev-comment-type="paramref" class="paramref">instance</code> (for closed instance delegates).</p>
</div>
<a id="HarmonyLib_AccessTools_Identifiable_" data-uid="HarmonyLib.AccessTools.Identifiable*"></a>
<h4 id="HarmonyLib_AccessTools_Identifiable_System_Reflection_MethodInfo_" data-uid="HarmonyLib.AccessTools.Identifiable(System.Reflection.MethodInfo)">Identifiable(MethodInfo)</h4>
<div class="markdown level1 summary"><p>Creates an identifiable version of a method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo Identifiable(this MethodInfo method)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MethodInfo</span></td>
<td><span class="parametername">method</span></td>
<td><p>The method</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Indexer_" data-uid="HarmonyLib.AccessTools.Indexer*"></a>
<h4 id="HarmonyLib_AccessTools_Indexer_System_Type_System_Type___" data-uid="HarmonyLib.AccessTools.Indexer(System.Type,System.Type[])">Indexer(Type, Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for an indexer property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo Indexer(Type type, Type[] parameters = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of multiple indexers</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>An indexer property or null when type is null or when it cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IndexerGetter_" data-uid="HarmonyLib.AccessTools.IndexerGetter*"></a>
<h4 id="HarmonyLib_AccessTools_IndexerGetter_System_Type_System_Type___" data-uid="HarmonyLib.AccessTools.IndexerGetter(System.Type,System.Type[])">IndexerGetter(Type, Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the getter method of an indexer property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo IndexerGetter(Type type, Type[] parameters = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of multiple indexers</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type is null or when the indexer property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IndexerSetter_" data-uid="HarmonyLib.AccessTools.IndexerSetter*"></a>
<h4 id="HarmonyLib_AccessTools_IndexerSetter_System_Type_System_Type___" data-uid="HarmonyLib.AccessTools.IndexerSetter(System.Type,System.Type[])">IndexerSetter(Type, Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the setter method of an indexer property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo IndexerSetter(Type type, Type[] parameters = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of multiple indexers</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type is null or when the indexer property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Inner_" data-uid="HarmonyLib.AccessTools.Inner*"></a>
<h4 id="HarmonyLib_AccessTools_Inner_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.Inner(System.Type,System.String)">Inner(Type, String)</h4>
<div class="markdown level1 summary"><p>Given a type, returns the first inner type matching a recursive search by name</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type Inner(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start searching at</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the inner type (case sensitive)</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span></td>
<td><p>The inner type or null if type/name is null or if a type with that name cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_InnerTypes_" data-uid="HarmonyLib.AccessTools.InnerTypes*"></a>
<h4 id="HarmonyLib_AccessTools_InnerTypes_System_Type_" data-uid="HarmonyLib.AccessTools.InnerTypes(System.Type)">InnerTypes(Type)</h4>
<div class="markdown level1 summary"><p>Enumerates all inner types (non-recursive) of a given type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IEnumerable&lt;Type&gt; InnerTypes(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type to start with</p>
</td>
</tr>
</tbody>
</table>
<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">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.Type</span>&gt;</td>
<td><p>An enumeration of all inner <span class="xref">System.Type</span></p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsClass_" data-uid="HarmonyLib.AccessTools.IsClass*"></a>
<h4 id="HarmonyLib_AccessTools_IsClass_System_Type_" data-uid="HarmonyLib.AccessTools.IsClass(System.Type)">IsClass(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is a class</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsClass(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type is a class</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsDeclaredMember_" data-uid="HarmonyLib.AccessTools.IsDeclaredMember*"></a>
<h4 id="HarmonyLib_AccessTools_IsDeclaredMember__1___0_" data-uid="HarmonyLib.AccessTools.IsDeclaredMember``1(``0)">IsDeclaredMember&lt;T&gt;(T)</h4>
<div class="markdown level1 summary"><p>Test if a class member is actually an concrete implementation</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsDeclaredMember&lt;T&gt;(this T member)
where T : MemberInfo</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">member</span></td>
<td><p>A member</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the member is a declared</p>
</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></td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsFloatingPoint_" data-uid="HarmonyLib.AccessTools.IsFloatingPoint*"></a>
<h4 id="HarmonyLib_AccessTools_IsFloatingPoint_System_Type_" data-uid="HarmonyLib.AccessTools.IsFloatingPoint(System.Type)">IsFloatingPoint(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is a floating point type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsFloatingPoint(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type represents some floating point</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsInteger_" data-uid="HarmonyLib.AccessTools.IsInteger*"></a>
<h4 id="HarmonyLib_AccessTools_IsInteger_System_Type_" data-uid="HarmonyLib.AccessTools.IsInteger(System.Type)">IsInteger(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is an integer type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsInteger(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type represents some integer</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsNumber_" data-uid="HarmonyLib.AccessTools.IsNumber*"></a>
<h4 id="HarmonyLib_AccessTools_IsNumber_System_Type_" data-uid="HarmonyLib.AccessTools.IsNumber(System.Type)">IsNumber(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is a numerical type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsNumber(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type represents some number</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsOfNullableType_" data-uid="HarmonyLib.AccessTools.IsOfNullableType*"></a>
<h4 id="HarmonyLib_AccessTools_IsOfNullableType__1___0_" data-uid="HarmonyLib.AccessTools.IsOfNullableType``1(``0)">IsOfNullableType&lt;T&gt;(T)</h4>
<div class="markdown level1 summary"><p>Test whether an instance is of a nullable type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsOfNullableType&lt;T&gt;(T instance)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">instance</span></td>
<td><p>An instance to test</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if instance is of nullable type, false if not</p>
</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>Type of instance</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsStatic_" data-uid="HarmonyLib.AccessTools.IsStatic*"></a>
<h4 id="HarmonyLib_AccessTools_IsStatic_System_Reflection_EventInfo_" data-uid="HarmonyLib.AccessTools.IsStatic(System.Reflection.EventInfo)">IsStatic(EventInfo)</h4>
<div class="markdown level1 summary"><p>Tests whether an event is static, as defined in C#</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsStatic(EventInfo eventInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.EventInfo</span></td>
<td><span class="parametername">eventInfo</span></td>
<td><p>The event</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the event is static</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsStatic_" data-uid="HarmonyLib.AccessTools.IsStatic*"></a>
<h4 id="HarmonyLib_AccessTools_IsStatic_System_Reflection_MemberInfo_" data-uid="HarmonyLib.AccessTools.IsStatic(System.Reflection.MemberInfo)">IsStatic(MemberInfo)</h4>
<div class="markdown level1 summary"><p>Tests whether a type or member is static, as defined in C#</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsStatic(MemberInfo member)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MemberInfo</span></td>
<td><span class="parametername">member</span></td>
<td><p>The type or member</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type or member is static</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsStatic_" data-uid="HarmonyLib.AccessTools.IsStatic*"></a>
<h4 id="HarmonyLib_AccessTools_IsStatic_System_Reflection_PropertyInfo_" data-uid="HarmonyLib.AccessTools.IsStatic(System.Reflection.PropertyInfo)">IsStatic(PropertyInfo)</h4>
<div class="markdown level1 summary"><p>Tests whether a property is static, as defined in C#</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsStatic(PropertyInfo propertyInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.PropertyInfo</span></td>
<td><span class="parametername">propertyInfo</span></td>
<td><p>The property</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the property is static</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsStatic_" data-uid="HarmonyLib.AccessTools.IsStatic*"></a>
<h4 id="HarmonyLib_AccessTools_IsStatic_System_Type_" data-uid="HarmonyLib.AccessTools.IsStatic(System.Type)">IsStatic(Type)</h4>
<div class="markdown level1 summary"><p>Tests whether a type is static, as defined in C#</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsStatic(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type is static</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsStruct_" data-uid="HarmonyLib.AccessTools.IsStruct*"></a>
<h4 id="HarmonyLib_AccessTools_IsStruct_System_Type_" data-uid="HarmonyLib.AccessTools.IsStruct(System.Type)">IsStruct(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is a struct</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsStruct(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type is a struct</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsValue_" data-uid="HarmonyLib.AccessTools.IsValue*"></a>
<h4 id="HarmonyLib_AccessTools_IsValue_System_Type_" data-uid="HarmonyLib.AccessTools.IsValue(System.Type)">IsValue(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is a value type</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsValue(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type is a value type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_IsVoid_" data-uid="HarmonyLib.AccessTools.IsVoid*"></a>
<h4 id="HarmonyLib_AccessTools_IsVoid_System_Type_" data-uid="HarmonyLib.AccessTools.IsVoid(System.Type)">IsVoid(Type)</h4>
<div class="markdown level1 summary"><p>Tests if a type is void</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsVoid(Type type)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type</p>
</td>
</tr>
</tbody>
</table>
<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">System.Boolean</span></td>
<td><p>True if the type is void</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_MakeDeepCopy_" data-uid="HarmonyLib.AccessTools.MakeDeepCopy*"></a>
<h4 id="HarmonyLib_AccessTools_MakeDeepCopy_System_Object_System_Type_System_Func_System_String_HarmonyLib_Traverse_HarmonyLib_Traverse_System_Object__System_String_" data-uid="HarmonyLib.AccessTools.MakeDeepCopy(System.Object,System.Type,System.Func{System.String,HarmonyLib.Traverse,HarmonyLib.Traverse,System.Object},System.String)">MakeDeepCopy(Object, Type, Func&lt;String, Traverse, Traverse, Object&gt;, String)</h4>
<div class="markdown level1 summary"><p>Makes a deep copy of any object</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static object MakeDeepCopy(object source, Type resultType, Func&lt;string, Traverse, Traverse, object&gt; processor = null, string pathRoot = &quot;&quot;)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">source</span></td>
<td><p>The original object</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">resultType</span></td>
<td><p>The type of the instance that should be created</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.String</span>, <a class="xref" href="HarmonyLib.Traverse.html">Traverse</a>, <a class="xref" href="HarmonyLib.Traverse.html">Traverse</a>, <span class="xref">System.Object</span>&gt;</td>
<td><span class="parametername">processor</span></td>
<td><p>Optional value transformation function (taking a field name and src/dst <a class="xref" href="HarmonyLib.Traverse.html">Traverse</a> instances)</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">pathRoot</span></td>
<td><p>The optional path root to start with</p>
</td>
</tr>
</tbody>
</table>
<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">System.Object</span></td>
<td><p>The copy of the original object</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_MakeDeepCopy_" data-uid="HarmonyLib.AccessTools.MakeDeepCopy*"></a>
<h4 id="HarmonyLib_AccessTools_MakeDeepCopy__1_System_Object_" data-uid="HarmonyLib.AccessTools.MakeDeepCopy``1(System.Object)">MakeDeepCopy&lt;T&gt;(Object)</h4>
<div class="markdown level1 summary"><p>Makes a deep copy of any object</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static T MakeDeepCopy&lt;T&gt;(object source)
where T : class</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">source</span></td>
<td><p>The original object</p>
</td>
</tr>
</tbody>
</table>
<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><p>A copy of the original object but of type T</p>
</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>The type of the instance that should be created; for legacy reasons, this must be a class or interface</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_MakeDeepCopy_" data-uid="HarmonyLib.AccessTools.MakeDeepCopy*"></a>
<h4 id="HarmonyLib_AccessTools_MakeDeepCopy__1_System_Object___0__System_Func_System_String_HarmonyLib_Traverse_HarmonyLib_Traverse_System_Object__System_String_" data-uid="HarmonyLib.AccessTools.MakeDeepCopy``1(System.Object,``0@,System.Func{System.String,HarmonyLib.Traverse,HarmonyLib.Traverse,System.Object},System.String)">MakeDeepCopy&lt;T&gt;(Object, out T, Func&lt;String, Traverse, Traverse, Object&gt;, String)</h4>
<div class="markdown level1 summary"><p>Makes a deep copy of any object</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void MakeDeepCopy&lt;T&gt;(object source, out T result, Func&lt;string, Traverse, Traverse, object&gt; processor = null, string pathRoot = &quot;&quot;)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">source</span></td>
<td><p>The original object</p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">result</span></td>
<td><p>[out] The copy of the original object</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Func</span>&lt;<span class="xref">System.String</span>, <a class="xref" href="HarmonyLib.Traverse.html">Traverse</a>, <a class="xref" href="HarmonyLib.Traverse.html">Traverse</a>, <span class="xref">System.Object</span>&gt;</td>
<td><span class="parametername">processor</span></td>
<td><p>Optional value transformation function (taking a field name and src/dst <a class="xref" href="HarmonyLib.Traverse.html">Traverse</a> instances)</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">pathRoot</span></td>
<td><p>The optional path root to start with</p>
</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>The type of the instance that should be created</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Method_" data-uid="HarmonyLib.AccessTools.Method*"></a>
<h4 id="HarmonyLib_AccessTools_Method_System_String_System_Type___System_Type___" data-uid="HarmonyLib.AccessTools.Method(System.String,System.Type[],System.Type[])">Method(String, Type[], Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a method by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo Method(string typeColonName, Type[] parameters = null, Type[] generics = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of the method</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">generics</span></td>
<td><p>Optional list of types that define the generic version of the method</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when the method cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Method_" data-uid="HarmonyLib.AccessTools.Method*"></a>
<h4 id="HarmonyLib_AccessTools_Method_System_Type_System_String_System_Type___System_Type___" data-uid="HarmonyLib.AccessTools.Method(System.Type,System.String,System.Type[],System.Type[])">Method(Type, String, Type[], Type[])</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a method by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo Method(Type type, string name, Type[] parameters = null, Type[] generics = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type where the method is declared</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the method (case sensitive)</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">parameters</span></td>
<td><p>Optional parameters to target a specific overload of the method</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">generics</span></td>
<td><p>Optional list of types that define the generic version of the method</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the method cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_MethodDelegate_" data-uid="HarmonyLib.AccessTools.MethodDelegate*"></a>
<h4 id="HarmonyLib_AccessTools_MethodDelegate__1_System_Reflection_MethodInfo_System_Object_System_Boolean_System_Type___" data-uid="HarmonyLib.AccessTools.MethodDelegate``1(System.Reflection.MethodInfo,System.Object,System.Boolean,System.Type[])">MethodDelegate&lt;DelegateType&gt;(MethodInfo, Object, Boolean, Type[])</h4>
<div class="markdown level1 summary"><p>Creates a delegate to a given method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static DelegateType MethodDelegate&lt;DelegateType&gt;(MethodInfo method, object instance = null, bool virtualCall = true, Type[] delegateArgs = null)
where DelegateType : Delegate</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.MethodInfo</span></td>
<td><span class="parametername">method</span></td>
<td><p>The method to create a delegate from.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">instance</span></td>
<td><p>Only applies for instance methods. If <code>null</code> (default), returned delegate is an open (a.k.a. unbound) instance delegate
where an instance is supplied as the first argument to the delegate invocation; else, delegate is a closed (a.k.a. bound)
instance delegate where the delegate invocation always applies to the given <code data-dev-comment-type="paramref" class="paramref">instance</code>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">virtualCall</span></td>
<td><p>Only applies for instance methods. If <code>true</code> (default) and <code data-dev-comment-type="paramref" class="paramref">method</code> is virtual, invocation of the delegate
calls the instance method virtually (the instance type's most-derived/overriden implementation of the method is called);
else, invocation of the delegate calls the exact specified <code data-dev-comment-type="paramref" class="paramref">method</code> (this is useful for calling base class methods)
Note: if <code>false</code> and <code data-dev-comment-type="paramref" class="paramref">method</code> is an interface method, an ArgumentException is thrown.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">delegateArgs</span></td>
<td><p>Only applies for instance methods, and if argument <code data-dev-comment-type="paramref" class="paramref">instance</code> is null.
This argument only matters if the target <code data-dev-comment-type="paramref" class="paramref">method</code> signature contains a value type (such as struct or primitive types),
and your <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> argument is replaced by a non-value type
(usually <code>object</code>) instead of using said value type.
Use this if the generic arguments of <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> doesn't represent the delegate's
arguments, and calling this function fails
<returns>A delegate of given <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> to given <code data-dev-comment-type="paramref" class="paramref">method</code></returns></p>
</td>
</tr>
</tbody>
</table>
<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">DelegateType</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">DelegateType</span></td>
<td><p>The delegate Type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_MethodDelegate__1_System_Reflection_MethodInfo_System_Object_System_Boolean_System_Type____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
Delegate invocation is more performant and more convenient to use than <span class="xref">System.Reflection.MethodBase.Invoke(System.Object,System.Object[])</span>
at a one-time setup cost.
</p>
<p>
Works for both type of static and instance methods, both open and closed (a.k.a. unbound and bound) instance methods,
and both class and struct methods.
</p>
</div>
<a id="HarmonyLib_AccessTools_MethodDelegate_" data-uid="HarmonyLib.AccessTools.MethodDelegate*"></a>
<h4 id="HarmonyLib_AccessTools_MethodDelegate__1_System_String_System_Object_System_Boolean_System_Type___" data-uid="HarmonyLib.AccessTools.MethodDelegate``1(System.String,System.Object,System.Boolean,System.Type[])">MethodDelegate&lt;DelegateType&gt;(String, Object, Boolean, Type[])</h4>
<div class="markdown level1 summary"><p>Creates a delegate to a given method</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static DelegateType MethodDelegate&lt;DelegateType&gt;(string typeColonName, object instance = null, bool virtualCall = true, Type[] delegateArgs = null)
where DelegateType : Delegate</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The method in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">instance</span></td>
<td><p>Only applies for instance methods. If <code>null</code> (default), returned delegate is an open (a.k.a. unbound) instance delegate
where an instance is supplied as the first argument to the delegate invocation; else, delegate is a closed (a.k.a. bound)
instance delegate where the delegate invocation always applies to the given <code data-dev-comment-type="paramref" class="paramref">instance</code>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">virtualCall</span></td>
<td><p>Only applies for instance methods. If <code>true</code> (default) and <code data-dev-comment-type="paramref" class="paramref">typeColonName</code> is virtual, invocation of the delegate
calls the instance method virtually (the instance type's most-derived/overriden implementation of the method is called);
else, invocation of the delegate calls the exact specified <code data-dev-comment-type="paramref" class="paramref">typeColonName</code> (this is useful for calling base class methods)
Note: if <code>false</code> and <code data-dev-comment-type="paramref" class="paramref">typeColonName</code> is an interface method, an ArgumentException is thrown.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Type</span>[]</td>
<td><span class="parametername">delegateArgs</span></td>
<td><p>Only applies for instance methods, and if argument <code data-dev-comment-type="paramref" class="paramref">instance</code> is null.
This argument only matters if the target <code data-dev-comment-type="paramref" class="paramref">typeColonName</code> signature contains a value type (such as struct or primitive types),
and your <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> argument is replaced by a non-value type
(usually <code>object</code>) instead of using said value type.
Use this if the generic arguments of <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> doesn't represent the delegate's
arguments, and calling this function fails
<returns>A delegate of given <code data-dev-comment-type="typeparamref" class="typeparamref">DelegateType</code> to given <code data-dev-comment-type="paramref" class="paramref">typeColonName</code></returns></p>
</td>
</tr>
</tbody>
</table>
<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">DelegateType</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">DelegateType</span></td>
<td><p>The delegate Type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_MethodDelegate__1_System_String_System_Object_System_Boolean_System_Type____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
Delegate invocation is more performant and more convenient to use than <span class="xref">System.Reflection.MethodBase.Invoke(System.Object,System.Object[])</span>
at a one-time setup cost.
</p>
<p>
Works for both type of static and instance methods, both open and closed (a.k.a. unbound and bound) instance methods,
and both class and struct methods.
</p>
</div>
<a id="HarmonyLib_AccessTools_Property_" data-uid="HarmonyLib.AccessTools.Property*"></a>
<h4 id="HarmonyLib_AccessTools_Property_System_String_" data-uid="HarmonyLib.AccessTools.Property(System.String)">Property(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo Property(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>A property or null when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_Property_" data-uid="HarmonyLib.AccessTools.Property*"></a>
<h4 id="HarmonyLib_AccessTools_Property_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.Property(System.Type,System.String)">Property(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for a property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static PropertyInfo Property(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.PropertyInfo</span></td>
<td><p>A property or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_PropertyGetter_" data-uid="HarmonyLib.AccessTools.PropertyGetter*"></a>
<h4 id="HarmonyLib_AccessTools_PropertyGetter_System_String_" data-uid="HarmonyLib.AccessTools.PropertyGetter(System.String)">PropertyGetter(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the getter method of a property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo PropertyGetter(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_PropertyGetter_" data-uid="HarmonyLib.AccessTools.PropertyGetter*"></a>
<h4 id="HarmonyLib_AccessTools_PropertyGetter_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.PropertyGetter(System.Type,System.String)">PropertyGetter(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the getter method of a property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo PropertyGetter(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_PropertySetter_" data-uid="HarmonyLib.AccessTools.PropertySetter*"></a>
<h4 id="HarmonyLib_AccessTools_PropertySetter_System_String_" data-uid="HarmonyLib.AccessTools.PropertySetter(System.String)">PropertySetter(String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the setter method of a property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo PropertySetter(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_PropertySetter_" data-uid="HarmonyLib.AccessTools.PropertySetter*"></a>
<h4 id="HarmonyLib_AccessTools_PropertySetter_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.PropertySetter(System.Type,System.String)">PropertySetter(Type, String)</h4>
<div class="markdown level1 summary"><p>Gets the reflection information for the setter method of a property by searching the type and all its super types</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MethodInfo PropertySetter(Type type, string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The class/type</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name</p>
</td>
</tr>
</tbody>
</table>
<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">System.Reflection.MethodInfo</span></td>
<td><p>A method or null when type/name is null or when the property cannot be found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_RethrowException_" data-uid="HarmonyLib.AccessTools.RethrowException*"></a>
<h4 id="HarmonyLib_AccessTools_RethrowException_System_Exception_" data-uid="HarmonyLib.AccessTools.RethrowException(System.Exception)">RethrowException(Exception)</h4>
<div class="markdown level1 summary"><p>Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void RethrowException(Exception exception)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Exception</span></td>
<td><span class="parametername">exception</span></td>
<td><p>The exception to rethrow</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_StaticFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StaticFieldRefAccess__1_System_Reflection_FieldInfo_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess``1(System.Reflection.FieldInfo)">StaticFieldRefAccess&lt;F&gt;(FieldInfo)</h4>
<div class="markdown level1 summary"><p>Creates a static field reference delegate</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.FieldRef&lt;F&gt; StaticFieldRefAccess&lt;F&gt;(FieldInfo fieldInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.FieldInfo</span></td>
<td><span class="parametername">fieldInfo</span></td>
<td><p>The field</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.FieldRef-1.html">AccessTools.FieldRef</a>&lt;F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.FieldRef-1.html">AccessTools.FieldRef&lt;F&gt;</a> delegate</p>
</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">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_StaticFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StaticFieldRefAccess__1_System_String_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess``1(System.String)">StaticFieldRefAccess&lt;F&gt;(String)</h4>
<div class="markdown level1 summary"><p>Creates a static field reference</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F StaticFieldRefAccess&lt;F&gt;(string typeColonName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">typeColonName</span></td>
<td><p>The member in the form <code>TypeFullName:MemberName</code>, where TypeFullName matches the form recognized by <a href="https://docs.microsoft.com/en-us/dotnet/api/system.type.gettype">Type.GetType</a> like <code>Some.Namespace.Type</code>.</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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">F</span></td>
<td><p>The type of the field</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_StaticFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StaticFieldRefAccess__1_System_Type_System_String_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess``1(System.Type,System.String)">StaticFieldRefAccess&lt;F&gt;(Type, String)</h4>
<div class="markdown level1 summary"><p>Creates a static field reference</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F StaticFieldRefAccess&lt;F&gt;(Type type, string fieldName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type (can be class or struct) the field is defined in</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_StaticFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StaticFieldRefAccess__2_System_Reflection_FieldInfo_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess``2(System.Reflection.FieldInfo)">StaticFieldRefAccess&lt;T, F&gt;(FieldInfo)</h4>
<div class="markdown level1 summary"><p>Creates a static field reference</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F StaticFieldRefAccess&lt;T, F&gt;(FieldInfo fieldInfo)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.FieldInfo</span></td>
<td><span class="parametername">fieldInfo</span></td>
<td><p>The field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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>An arbitrary type (by convention, the type the field is defined in)</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_StaticFieldRefAccess__2_System_Reflection_FieldInfo__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The type parameter <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> is only used in exception messaging and to distinguish between this method overload
and the <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_StaticFieldRefAccess__1_System_Reflection_FieldInfo_">StaticFieldRefAccess&lt;F&gt;(FieldInfo)</a> overload (which returns a <a class="xref" href="HarmonyLib.AccessTools.FieldRef-1.html">AccessTools.FieldRef&lt;F&gt;</a> rather than a reference).</p>
</div>
<a id="HarmonyLib_AccessTools_StaticFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StaticFieldRefAccess__2_System_String_" data-uid="HarmonyLib.AccessTools.StaticFieldRefAccess``2(System.String)">StaticFieldRefAccess&lt;T, F&gt;(String)</h4>
<div class="markdown level1 summary"><p>Creates a static field reference</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F StaticFieldRefAccess&lt;T, F&gt;(string fieldName)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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>The type (can be class or struct) the field is defined in</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_StructFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StructFieldRefAccess__2___0__System_Reflection_FieldInfo_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess``2(``0@,System.Reflection.FieldInfo)">StructFieldRefAccess&lt;T, F&gt;(ref T, FieldInfo)</h4>
<div class="markdown level1 summary"><p>Creates a field reference for an instance field of a struct</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F StructFieldRefAccess&lt;T, F&gt;(ref T instance, FieldInfo fieldInfo)
where T : struct</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">instance</span></td>
<td><p>The instance</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Reflection.FieldInfo</span></td>
<td><span class="parametername">fieldInfo</span></td>
<td><p>The field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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>The struct that defines the instance field</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_StructFieldRefAccess__2___0__System_Reflection_FieldInfo__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for one-off access to a field&apos;s value for a single instance and where the field has already been obtained.
If you need to access a field&apos;s value for potentially multiple instances, use <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_StructFieldRefAccess__2_System_Reflection_FieldInfo_">StructFieldRefAccess&lt;T, F&gt;(FieldInfo)</a> instead.
<code>StructFieldRefAccess&lt;T, F>(ref instance, fieldInfo)</code> is functionally equivalent to <code>StructFieldRefAccess&lt;T, F>(fieldInfo)(ref instance)</code>.
</p>
</div>
<a id="HarmonyLib_AccessTools_StructFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StructFieldRefAccess__2___0__System_String_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess``2(``0@,System.String)">StructFieldRefAccess&lt;T, F&gt;(ref T, String)</h4>
<div class="markdown level1 summary"><p>Creates an instance field reference for a specific instance of a struct</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static F StructFieldRefAccess&lt;T, F&gt;(ref T instance, string fieldName)
where T : struct</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">instance</span></td>
<td><p>The instance</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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">F</span></td>
<td><p>A readable/assignable reference to the field</p>
</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>The struct that defines the instance field</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_StructFieldRefAccess__2___0__System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for one-off access to a field&apos;s value for a single instance.
If you need to access a field&apos;s value for potentially multiple instances, use <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_StructFieldRefAccess__2_System_String_">StructFieldRefAccess&lt;T, F&gt;(String)</a> instead.
<code>StructFieldRefAccess&lt;T, F>(ref instance, fieldName)</code> is functionally equivalent to <code>StructFieldRefAccess&lt;T, F>(fieldName)(ref instance)</code>.
</p>
</div>
<a id="HarmonyLib_AccessTools_StructFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StructFieldRefAccess__2_System_Reflection_FieldInfo_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess``2(System.Reflection.FieldInfo)">StructFieldRefAccess&lt;T, F&gt;(FieldInfo)</h4>
<div class="markdown level1 summary"><p>Creates a field reference delegate for an instance field of a struct</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.StructFieldRef&lt;T, F&gt; StructFieldRefAccess&lt;T, F&gt;(FieldInfo fieldInfo)
where T : struct</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Reflection.FieldInfo</span></td>
<td><span class="parametername">fieldInfo</span></td>
<td><p>The field</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.StructFieldRef-2.html">AccessTools.StructFieldRef</a>&lt;T, F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.StructFieldRef-2.html">AccessTools.StructFieldRef&lt;T, F&gt;</a> delegate</p>
</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>The struct that defines the instance field</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<h5 id="HarmonyLib_AccessTools_StructFieldRefAccess__2_System_Reflection_FieldInfo__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
This method is meant for cases where the field has already been obtained, avoiding the field searching cost in
e.g. <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_StructFieldRefAccess__2_System_String_">StructFieldRefAccess&lt;T, F&gt;(String)</a>.
</p>
</div>
<a id="HarmonyLib_AccessTools_StructFieldRefAccess_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess*"></a>
<h4 id="HarmonyLib_AccessTools_StructFieldRefAccess__2_System_String_" data-uid="HarmonyLib.AccessTools.StructFieldRefAccess``2(System.String)">StructFieldRefAccess&lt;T, F&gt;(String)</h4>
<div class="markdown level1 summary"><p>Creates a field reference delegate for an instance field of a struct</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static AccessTools.StructFieldRef&lt;T, F&gt; StructFieldRefAccess&lt;T, F&gt;(string fieldName)
where T : struct</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">fieldName</span></td>
<td><p>The name of the field</p>
</td>
</tr>
</tbody>
</table>
<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><a class="xref" href="HarmonyLib.AccessTools.StructFieldRef-2.html">AccessTools.StructFieldRef</a>&lt;T, F&gt;</td>
<td><p>A readable/assignable <a class="xref" href="HarmonyLib.AccessTools.StructFieldRef-2.html">AccessTools.StructFieldRef&lt;T, F&gt;</a> delegate</p>
</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>The struct that defines the instance field</p>
</td>
</tr>
<tr>
<td><span class="parametername">F</span></td>
<td><p>The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type),
a type that <span class="xref">System.Type.IsAssignableFrom(System.Type)</span> that type; or if the field's type is an enum type,
either that type or the underlying integral type of that enum type</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_ThrowMissingMemberException_" data-uid="HarmonyLib.AccessTools.ThrowMissingMemberException*"></a>
<h4 id="HarmonyLib_AccessTools_ThrowMissingMemberException_System_Type_System_String___" data-uid="HarmonyLib.AccessTools.ThrowMissingMemberException(System.Type,System.String[])">ThrowMissingMemberException(Type, String[])</h4>
<div class="markdown level1 summary"><p>Throws a missing member runtime exception</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void ThrowMissingMemberException(Type type, params string[] names)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Type</span></td>
<td><span class="parametername">type</span></td>
<td><p>The type that is involved</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span>[]</td>
<td><span class="parametername">names</span></td>
<td><p>A list of names</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_TypeByName_" data-uid="HarmonyLib.AccessTools.TypeByName*"></a>
<h4 id="HarmonyLib_AccessTools_TypeByName_System_String_" data-uid="HarmonyLib.AccessTools.TypeByName(System.String)">TypeByName(String)</h4>
<div class="markdown level1 summary"><p>Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type TypeByName(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span></td>
<td><p>A type or null if not found</p>
</td>
</tr>
</tbody>
</table>
<a id="HarmonyLib_AccessTools_TypeSearch_" data-uid="HarmonyLib.AccessTools.TypeSearch*"></a>
<h4 id="HarmonyLib_AccessTools_TypeSearch_System_Text_RegularExpressions_Regex_System_Boolean_" data-uid="HarmonyLib.AccessTools.TypeSearch(System.Text.RegularExpressions.Regex,System.Boolean)">TypeSearch(Regex, Boolean)</h4>
<div class="markdown level1 summary"><p>Searches a type by regular expression; for exact searching, use <a class="xref" href="HarmonyLib.AccessTools.html#HarmonyLib_AccessTools_TypeByName_System_String_">TypeByName(String)</a></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Type TypeSearch(Regex search, bool invalidateCache = false)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.RegularExpressions.Regex</span></td>
<td><span class="parametername">search</span></td>
<td><p>The regular expression that matches against Type.FullName or Type.Name</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">invalidateCache</span></td>
<td><p>Refetches the cached types if set to true</p>
</td>
</tr>
</tbody>
</table>
<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">System.Type</span></td>
<td><p>The first type where FullName or Name matches the search</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">
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</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>