mirror of
https://github.com/pardeike/Harmony
synced 2026-06-08 16:40:38 +00:00
3018 lines
126 KiB
HTML
3018 lines
126 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.40.12.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="Harmony.AccessTools">
|
|
|
|
|
|
<h1 id="Harmony_AccessTools" data-uid="Harmony.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="Harmony.html">Harmony</a></h6>
|
|
<h6><strong>Assembly</strong>: 0Harmony.dll</h6>
|
|
<h5 id="Harmony_AccessTools_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static class AccessTools : object</code></pre>
|
|
</div>
|
|
<h3 id="fields">Fields
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_all.md&value=---%0Auid%3A%20Harmony.AccessTools.all%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L15">View Source</a>
|
|
</span>
|
|
<h4 id="Harmony_AccessTools_all" data-uid="Harmony.AccessTools.all">all</h4>
|
|
<div class="markdown level1 summary"><p>Shortcut 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 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">BindingFlags</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_allDeclared.md&value=---%0Auid%3A%20Harmony.AccessTools.allDeclared%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L25">View Source</a>
|
|
</span>
|
|
<h4 id="Harmony_AccessTools_allDeclared" data-uid="Harmony.AccessTools.allDeclared">allDeclared</h4>
|
|
<div class="markdown level1 summary"><p>Shortcut 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 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">BindingFlags</span></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="methods">Methods
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_ActualParameters_MethodBase_System_Object___.md&value=---%0Auid%3A%20Harmony.AccessTools.ActualParameters(MethodBase%2CSystem.Object%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L704">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_ActualParameters_" data-uid="Harmony.AccessTools.ActualParameters*"></a>
|
|
<h4 id="Harmony_AccessTools_ActualParameters_MethodBase_System_Object___" data-uid="Harmony.AccessTools.ActualParameters(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">MethodBase</span></td>
|
|
<td><span class="parametername">method</span></td>
|
|
<td><p>The method 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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_Constructor_Type_Type___.md&value=---%0Auid%3A%20Harmony.AccessTools.Constructor(Type%2CType%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L490">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_Constructor_" data-uid="Harmony.AccessTools.Constructor*"></a>
|
|
<h4 id="Harmony_AccessTools_Constructor_Type_Type___" data-uid="Harmony.AccessTools.Constructor(Type,Type[])">Constructor(Type, Type[])</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)</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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class where the constructor is declared</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">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>
|
|
</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">ConstructorInfo</span></td>
|
|
<td><p>A ConstructorInfo or null when type is null or when the method cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_CreateInstance_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.CreateInstance(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L822">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_CreateInstance_" data-uid="Harmony.AccessTools.CreateInstance*"></a>
|
|
<h4 id="Harmony_AccessTools_CreateInstance_Type_" data-uid="Harmony.AccessTools.CreateInstance(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">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.Object</span></td>
|
|
<td><p>The new instance</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredConstructor_Type_Type___.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredConstructor(Type%2CType%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L473">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredConstructor_" data-uid="Harmony.AccessTools.DeclaredConstructor*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredConstructor_Type_Type___" data-uid="Harmony.AccessTools.DeclaredConstructor(Type,Type[])">DeclaredConstructor(Type, Type[])</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)</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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class where the constructor is declared</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">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>
|
|
</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">ConstructorInfo</span></td>
|
|
<td><p>A ConstructorInfo or null when type is null or when the constructor cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredField_Type_System_Int32_.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredField(Type%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L138">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredField_" data-uid="Harmony.AccessTools.DeclaredField*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredField_Type_System_Int32_" data-uid="Harmony.AccessTools.DeclaredField(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">FieldInfo</span></td>
|
|
<td><p>A FieldInfo or null when type is null or when the field cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredField_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredField(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L88">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredField_" data-uid="Harmony.AccessTools.DeclaredField*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredField_Type_System_String_" data-uid="Harmony.AccessTools.DeclaredField(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">FieldInfo</span></td>
|
|
<td><p>A FieldInfo or null when type/name is null or when the field cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredMethod_Type_System_String_Type___Type___.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredMethod(Type%2CSystem.String%2CType%5B%5D%2CType%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L249">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredMethod_" data-uid="Harmony.AccessTools.DeclaredMethod*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredMethod_Type_System_String_Type___Type___" data-uid="Harmony.AccessTools.DeclaredMethod(Type,System.String,Type[],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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">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">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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the method cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredProperty_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredProperty(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L157">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredProperty_" data-uid="Harmony.AccessTools.DeclaredProperty*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredProperty_Type_System_String_" data-uid="Harmony.AccessTools.DeclaredProperty(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">PropertyInfo</span></td>
|
|
<td><p>A PropertyInfo or null when type/name is null or when the property cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredPropertyGetter_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredPropertyGetter(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L182">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredPropertyGetter_" data-uid="Harmony.AccessTools.DeclaredPropertyGetter*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredPropertyGetter_Type_System_String_" data-uid="Harmony.AccessTools.DeclaredPropertyGetter(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the property cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_DeclaredPropertySetter_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.DeclaredPropertySetter(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L192">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_DeclaredPropertySetter_" data-uid="Harmony.AccessTools.DeclaredPropertySetter*"></a>
|
|
<h4 id="Harmony_AccessTools_DeclaredPropertySetter_Type_System_String_" data-uid="Harmony.AccessTools.DeclaredPropertySetter(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the property cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_Field_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.Field(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L113">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_Field_" data-uid="Harmony.AccessTools.Field*"></a>
|
|
<h4 id="Harmony_AccessTools_Field_Type_System_String_" data-uid="Harmony.AccessTools.Field(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">FieldInfo</span></td>
|
|
<td><p>A FieldInfo or null when type/name is null or when the field cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FieldRefAccess__2___0_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.FieldRefAccess%60%602(%60%600%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L784">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FieldRefAccess_" data-uid="Harmony.AccessTools.FieldRefAccess*"></a>
|
|
<h4 id="Harmony_AccessTools_FieldRefAccess__2___0_System_String_" data-uid="Harmony.AccessTools.FieldRefAccess``2(``0,System.String)">FieldRefAccess<T, U>(T, String)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a field reference for a specific 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 U FieldRefAccess<T, U>(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">U</span></td>
|
|
<td><p>A read and writable field reference</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 the field is defined in</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="parametername">U</span></td>
|
|
<td><p>The type of the field</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FieldRefAccess__2_FieldInfo_.md&value=---%0Auid%3A%20Harmony.AccessTools.FieldRefAccess%60%602(FieldInfo)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L745">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FieldRefAccess_" data-uid="Harmony.AccessTools.FieldRefAccess*"></a>
|
|
<h4 id="Harmony_AccessTools_FieldRefAccess__2_FieldInfo_" data-uid="Harmony.AccessTools.FieldRefAccess``2(FieldInfo)">FieldRefAccess<T, U>(FieldInfo)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a 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 AccessTools.FieldRef<T, U> FieldRefAccess<T, U>(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">FieldInfo</span></td>
|
|
<td><span class="parametername">fieldInfo</span></td>
|
|
<td><p>FieldInfo for 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="Harmony.AccessTools.FieldRef-2.html">AccessTools.FieldRef</a><T, U></td>
|
|
<td><p>A read and writable field reference</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 the field is defined in</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="parametername">U</span></td>
|
|
<td><p>The type of the field</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FieldRefAccess__2_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.FieldRefAccess%60%602(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L729">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FieldRefAccess_" data-uid="Harmony.AccessTools.FieldRefAccess*"></a>
|
|
<h4 id="Harmony_AccessTools_FieldRefAccess__2_System_String_" data-uid="Harmony.AccessTools.FieldRefAccess``2(System.String)">FieldRefAccess<T, U>(String)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a 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 AccessTools.FieldRef<T, U> FieldRefAccess<T, U>(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="Harmony.AccessTools.FieldRef-2.html">AccessTools.FieldRef</a><T, U></td>
|
|
<td><p>A read and writable field reference</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 the field is defined in</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="parametername">U</span></td>
|
|
<td><p>The type of the field</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FindIncludingBaseTypes__1_Type_Func_Type___0__.md&value=---%0Auid%3A%20Harmony.AccessTools.FindIncludingBaseTypes%60%601(Type%2CFunc%7BType%2C%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L53">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FindIncludingBaseTypes_" data-uid="Harmony.AccessTools.FindIncludingBaseTypes*"></a>
|
|
<h4 id="Harmony_AccessTools_FindIncludingBaseTypes__1_Type_Func_Type___0__" data-uid="Harmony.AccessTools.FindIncludingBaseTypes``1(Type,Func{Type,``0})">FindIncludingBaseTypes<T>(Type, Func<Type, T>)</h4>
|
|
<div class="markdown level1 summary"><p>Applies a function going up the type hierarchy and stops at the first non null 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<T>(Type type, Func<Type, T> func)</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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The type to start with</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">Func</span><<span class="xref">Type</span>, T></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>Returns the first non null result or default(T) when reaching the top level type object</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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FindIncludingInnerTypes__1_Type_Func_Type___0__.md&value=---%0Auid%3A%20Harmony.AccessTools.FindIncludingInnerTypes%60%601(Type%2CFunc%7BType%2C%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L70">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FindIncludingInnerTypes_" data-uid="Harmony.AccessTools.FindIncludingInnerTypes*"></a>
|
|
<h4 id="Harmony_AccessTools_FindIncludingInnerTypes__1_Type_Func_Type___0__" data-uid="Harmony.AccessTools.FindIncludingInnerTypes``1(Type,Func{Type,``0})">FindIncludingInnerTypes<T>(Type, Func<Type, T>)</h4>
|
|
<div class="markdown level1 summary"><p>Applies a function going into inner types and stops at the first non null 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<T>(Type type, Func<Type, T> func)</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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The type to start with</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">Func</span><<span class="xref">Type</span>, T></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>Returns the first non null result or null with 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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FirstConstructor_Type_Func_ConstructorInfo_System_Boolean__.md&value=---%0Auid%3A%20Harmony.AccessTools.FirstConstructor(Type%2CFunc%7BConstructorInfo%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L650">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FirstConstructor_" data-uid="Harmony.AccessTools.FirstConstructor*"></a>
|
|
<h4 id="Harmony_AccessTools_FirstConstructor_Type_Func_ConstructorInfo_System_Boolean__" data-uid="Harmony.AccessTools.FirstConstructor(Type,Func{ConstructorInfo,System.Boolean})">FirstConstructor(Type, Func<ConstructorInfo, Boolean>)</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<ConstructorInfo, bool> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The type to start searching at</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">Func</span><<span class="xref">ConstructorInfo</span>, <span class="xref">System.Boolean</span>></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">ConstructorInfo</span></td>
|
|
<td><p>The ConstructorInfo or null if type/predicate is null or if a type with that name cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FirstInner_Type_Func_Type_System_Boolean__.md&value=---%0Auid%3A%20Harmony.AccessTools.FirstInner(Type%2CFunc%7BType%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L606">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FirstInner_" data-uid="Harmony.AccessTools.FirstInner*"></a>
|
|
<h4 id="Harmony_AccessTools_FirstInner_Type_Func_Type_System_Boolean__" data-uid="Harmony.AccessTools.FirstInner(Type,Func{Type,System.Boolean})">FirstInner(Type, Func<Type, Boolean>)</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<Type, bool> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The type to start searching at</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">Func</span><<span class="xref">Type</span>, <span class="xref">System.Boolean</span>></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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FirstMethod_Type_Func_MethodInfo_System_Boolean__.md&value=---%0Auid%3A%20Harmony.AccessTools.FirstMethod(Type%2CFunc%7BMethodInfo%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L628">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FirstMethod_" data-uid="Harmony.AccessTools.FirstMethod*"></a>
|
|
<h4 id="Harmony_AccessTools_FirstMethod_Type_Func_MethodInfo_System_Boolean__" data-uid="Harmony.AccessTools.FirstMethod(Type,Func{MethodInfo,System.Boolean})">FirstMethod(Type, Func<MethodInfo, Boolean>)</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<MethodInfo, bool> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The type to start searching at</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">Func</span><<span class="xref">MethodInfo</span>, <span class="xref">System.Boolean</span>></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">MethodInfo</span></td>
|
|
<td><p>The MethodInfo or null if type/predicate is null or if a type with that name cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_FirstProperty_Type_Func_PropertyInfo_System_Boolean__.md&value=---%0Auid%3A%20Harmony.AccessTools.FirstProperty(Type%2CFunc%7BPropertyInfo%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L672">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_FirstProperty_" data-uid="Harmony.AccessTools.FirstProperty*"></a>
|
|
<h4 id="Harmony_AccessTools_FirstProperty_Type_Func_PropertyInfo_System_Boolean__" data-uid="Harmony.AccessTools.FirstProperty(Type,Func{PropertyInfo,System.Boolean})">FirstProperty(Type, Func<PropertyInfo, Boolean>)</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<PropertyInfo, bool> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The type to start searching at</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">Func</span><<span class="xref">PropertyInfo</span>, <span class="xref">System.Boolean</span>></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">PropertyInfo</span></td>
|
|
<td><p>The PropertyInfo or null if type/predicate is null or if a type with that name cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetDeclaredConstructors_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetDeclaredConstructors(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L506">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetDeclaredConstructors_" data-uid="Harmony.AccessTools.GetDeclaredConstructors*"></a>
|
|
<h4 id="Harmony_AccessTools_GetDeclaredConstructors_Type_" data-uid="Harmony.AccessTools.GetDeclaredConstructors(Type)">GetDeclaredConstructors(Type)</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<ConstructorInfo> GetDeclaredConstructors(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class where the constructors 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">List</span><<span class="xref">ConstructorInfo</span>></td>
|
|
<td><p>A list of ConstructorInfo</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetDeclaredFields_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetDeclaredFields(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L551">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetDeclaredFields_" data-uid="Harmony.AccessTools.GetDeclaredFields*"></a>
|
|
<h4 id="Harmony_AccessTools_GetDeclaredFields_Type_" data-uid="Harmony.AccessTools.GetDeclaredFields(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<FieldInfo> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">List</span><<span class="xref">FieldInfo</span>></td>
|
|
<td><p>A list of FieldInfo</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetDeclaredMethods_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetDeclaredMethods(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L521">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetDeclaredMethods_" data-uid="Harmony.AccessTools.GetDeclaredMethods*"></a>
|
|
<h4 id="Harmony_AccessTools_GetDeclaredMethods_Type_" data-uid="Harmony.AccessTools.GetDeclaredMethods(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<MethodInfo> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">List</span><<span class="xref">MethodInfo</span>></td>
|
|
<td><p>A list of MethodInfo</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetDeclaredProperties_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetDeclaredProperties(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L536">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetDeclaredProperties_" data-uid="Harmony.AccessTools.GetDeclaredProperties*"></a>
|
|
<h4 id="Harmony_AccessTools_GetDeclaredProperties_Type_" data-uid="Harmony.AccessTools.GetDeclaredProperties(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<PropertyInfo> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">List</span><<span class="xref">PropertyInfo</span>></td>
|
|
<td><p>A list of PropertyInfo</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetDefaultValue_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetDefaultValue(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L804">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetDefaultValue_" data-uid="Harmony.AccessTools.GetDefaultValue*"></a>
|
|
<h4 id="Harmony_AccessTools_GetDefaultValue_Type_" data-uid="Harmony.AccessTools.GetDefaultValue(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">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.Object</span></td>
|
|
<td><p>The default value</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetFieldNames_System_Object_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetFieldNames(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L406">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetFieldNames_" data-uid="Harmony.AccessTools.GetFieldNames*"></a>
|
|
<h4 id="Harmony_AccessTools_GetFieldNames_System_Object_" data-uid="Harmony.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<string> 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">List</span><<span class="xref">System.String</span>></td>
|
|
<td><p>A list of field names</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetFieldNames_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetFieldNames(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L391">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetFieldNames_" data-uid="Harmony.AccessTools.GetFieldNames*"></a>
|
|
<h4 id="Harmony_AccessTools_GetFieldNames_Type_" data-uid="Harmony.AccessTools.GetFieldNames(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<string> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The declaring 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">List</span><<span class="xref">System.String</span>></td>
|
|
<td><p>A list of field names</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetMethodNames_System_Object_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetMethodNames(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L376">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetMethodNames_" data-uid="Harmony.AccessTools.GetMethodNames*"></a>
|
|
<h4 id="Harmony_AccessTools_GetMethodNames_System_Object_" data-uid="Harmony.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<string> 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">List</span><<span class="xref">System.String</span>></td>
|
|
<td><p>A list of method names</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetMethodNames_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetMethodNames(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L361">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetMethodNames_" data-uid="Harmony.AccessTools.GetMethodNames*"></a>
|
|
<h4 id="Harmony_AccessTools_GetMethodNames_Type_" data-uid="Harmony.AccessTools.GetMethodNames(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<string> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The declaring 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">List</span><<span class="xref">System.String</span>></td>
|
|
<td><p>A list of method names</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetPropertyNames_System_Object_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetPropertyNames(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L436">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetPropertyNames_" data-uid="Harmony.AccessTools.GetPropertyNames*"></a>
|
|
<h4 id="Harmony_AccessTools_GetPropertyNames_System_Object_" data-uid="Harmony.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<string> 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">List</span><<span class="xref">System.String</span>></td>
|
|
<td><p>A list of property names</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetPropertyNames_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetPropertyNames(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L421">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetPropertyNames_" data-uid="Harmony.AccessTools.GetPropertyNames*"></a>
|
|
<h4 id="Harmony_AccessTools_GetPropertyNames_Type_" data-uid="Harmony.AccessTools.GetPropertyNames(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<string> 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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The declaring 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">List</span><<span class="xref">System.String</span>></td>
|
|
<td><p>A list of property names</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetReturnedType_MethodBase_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetReturnedType(MethodBase)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L566">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetReturnedType_" data-uid="Harmony.AccessTools.GetReturnedType*"></a>
|
|
<h4 id="Harmony_AccessTools_GetReturnedType_MethodBase_" data-uid="Harmony.AccessTools.GetReturnedType(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">MethodBase</span></td>
|
|
<td><span class="parametername">methodOrConstructor</span></td>
|
|
<td><p>The method or 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">Type</span></td>
|
|
<td><p>The return type of the method</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetTypes_System_Object___.md&value=---%0Auid%3A%20Harmony.AccessTools.GetTypes(System.Object%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L693">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetTypes_" data-uid="Harmony.AccessTools.GetTypes*"></a>
|
|
<h4 id="Harmony_AccessTools_GetTypes_System_Object___" data-uid="Harmony.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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_GetUnderlyingType_MemberInfo_.md&value=---%0Auid%3A%20Harmony.AccessTools.GetUnderlyingType(MemberInfo)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L451">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_GetUnderlyingType_" data-uid="Harmony.AccessTools.GetUnderlyingType*"></a>
|
|
<h4 id="Harmony_AccessTools_GetUnderlyingType_MemberInfo_" data-uid="Harmony.AccessTools.GetUnderlyingType(MemberInfo)">GetUnderlyingType(MemberInfo)</h4>
|
|
<div class="markdown level1 summary"><p>Gets the type of any member 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 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">MemberInfo</span></td>
|
|
<td><span class="parametername">member</span></td>
|
|
<td><p>An EventInfo, FieldInfo, MethodInfo, or PropertyInfo</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">Type</span></td>
|
|
<td><p>The type that represents the output of this member</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_Inner_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.Inner(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L584">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_Inner_" data-uid="Harmony.AccessTools.Inner*"></a>
|
|
<h4 id="Harmony_AccessTools_Inner_Type_System_String_" data-uid="Harmony.AccessTools.Inner(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The 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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_IsClass_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.IsClass(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L940">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_IsClass_" data-uid="Harmony.AccessTools.IsClass*"></a>
|
|
<h4 id="Harmony_AccessTools_IsClass_Type_" data-uid="Harmony.AccessTools.IsClass(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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_IsOfNullableType__1___0_.md&value=---%0Auid%3A%20Harmony.AccessTools.IsOfNullableType%60%601(%60%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L968">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_IsOfNullableType_" data-uid="Harmony.AccessTools.IsOfNullableType*"></a>
|
|
<h4 id="Harmony_AccessTools_IsOfNullableType__1___0_" data-uid="Harmony.AccessTools.IsOfNullableType``1(``0)">IsOfNullableType<T>(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<T>(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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_IsStruct_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.IsStruct(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L931">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_IsStruct_" data-uid="Harmony.AccessTools.IsStruct*"></a>
|
|
<h4 id="Harmony_AccessTools_IsStruct_Type_" data-uid="Harmony.AccessTools.IsStruct(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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_IsValue_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.IsValue(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L949">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_IsValue_" data-uid="Harmony.AccessTools.IsValue*"></a>
|
|
<h4 id="Harmony_AccessTools_IsValue_Type_" data-uid="Harmony.AccessTools.IsValue(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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_IsVoid_Type_.md&value=---%0Auid%3A%20Harmony.AccessTools.IsVoid(Type)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L958">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_IsVoid_" data-uid="Harmony.AccessTools.IsVoid*"></a>
|
|
<h4 id="Harmony_AccessTools_IsVoid_Type_" data-uid="Harmony.AccessTools.IsVoid(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">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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_MakeDeepCopy_System_Object_Type_Func_System_String_Harmony_Traverse_Harmony_Traverse_System_Object__System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.MakeDeepCopy(System.Object%2CType%2CFunc%7BSystem.String%2CHarmony.Traverse%2CHarmony.Traverse%2CSystem.Object%7D%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L861">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_MakeDeepCopy_" data-uid="Harmony.AccessTools.MakeDeepCopy*"></a>
|
|
<h4 id="Harmony_AccessTools_MakeDeepCopy_System_Object_Type_Func_System_String_Harmony_Traverse_Harmony_Traverse_System_Object__System_String_" data-uid="Harmony.AccessTools.MakeDeepCopy(System.Object,Type,Func{System.String,Harmony.Traverse,Harmony.Traverse,System.Object},System.String)">MakeDeepCopy(Object, Type, Func<String, Traverse, Traverse, Object>, 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<string, Traverse, Traverse, object> processor = null, string pathRoot = "")</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">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">Func</span><<span class="xref">System.String</span>, <a class="xref" href="Harmony.Traverse.html">Traverse</a>, <a class="xref" href="Harmony.Traverse.html">Traverse</a>, <span class="xref">System.Object</span>></td>
|
|
<td><span class="parametername">processor</span></td>
|
|
<td><p>Optional value transformation function (taking a field name and src/dst traverse objects)</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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_MakeDeepCopy__1_System_Object_.md&value=---%0Auid%3A%20Harmony.AccessTools.MakeDeepCopy%60%601(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L837">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_MakeDeepCopy_" data-uid="Harmony.AccessTools.MakeDeepCopy*"></a>
|
|
<h4 id="Harmony_AccessTools_MakeDeepCopy__1_System_Object_" data-uid="Harmony.AccessTools.MakeDeepCopy``1(System.Object)">MakeDeepCopy<T>(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<T>(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</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_MakeDeepCopy__1_System_Object___0__Func_System_String_Harmony_Traverse_Harmony_Traverse_System_Object__System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.MakeDeepCopy%60%601(System.Object%2C%60%600%40%2CFunc%7BSystem.String%2CHarmony.Traverse%2CHarmony.Traverse%2CSystem.Object%7D%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L849">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_MakeDeepCopy_" data-uid="Harmony.AccessTools.MakeDeepCopy*"></a>
|
|
<h4 id="Harmony_AccessTools_MakeDeepCopy__1_System_Object___0__Func_System_String_Harmony_Traverse_Harmony_Traverse_System_Object__System_String_" data-uid="Harmony.AccessTools.MakeDeepCopy``1(System.Object,``0@,Func{System.String,Harmony.Traverse,Harmony.Traverse,System.Object},System.String)">MakeDeepCopy<T>(Object, out T, Func<String, Traverse, Traverse, Object>, 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<T>(object source, out T result, Func<string, Traverse, Traverse, object> processor = null, string pathRoot = "")</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">Func</span><<span class="xref">System.String</span>, <a class="xref" href="Harmony.Traverse.html">Traverse</a>, <a class="xref" href="Harmony.Traverse.html">Traverse</a>, <span class="xref">System.Object</span>></td>
|
|
<td><span class="parametername">processor</span></td>
|
|
<td><p>Optional value transformation function (taking a field name and src/dst traverse objects)</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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_Method_System_String_Type___Type___.md&value=---%0Auid%3A%20Harmony.AccessTools.Method(System.String%2CType%5B%5D%2CType%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L341">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_Method_" data-uid="Harmony.AccessTools.Method*"></a>
|
|
<h4 id="Harmony_AccessTools_Method_System_String_Type___Type___" data-uid="Harmony.AccessTools.Method(System.String,Type[],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 typeColonMethodname, 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">typeColonMethodname</span></td>
|
|
<td><p>The full name (Namespace.Type1.Type2:MethodName) of the type where the method is declared</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">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">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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the method cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_Method_Type_System_String_Type___Type___.md&value=---%0Auid%3A%20Harmony.AccessTools.Method(Type%2CSystem.String%2CType%5B%5D%2CType%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L289">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_Method_" data-uid="Harmony.AccessTools.Method*"></a>
|
|
<h4 id="Harmony_AccessTools_Method_Type_System_String_Type___Type___" data-uid="Harmony.AccessTools.Method(Type,System.String,Type[],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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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">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">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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the method cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_Property_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.Property(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L202">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_Property_" data-uid="Harmony.AccessTools.Property*"></a>
|
|
<h4 id="Harmony_AccessTools_Property_Type_System_String_" data-uid="Harmony.AccessTools.Property(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The 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">PropertyInfo</span></td>
|
|
<td><p>A PropertyInfo or null when type/name is null or when the property cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_PropertyGetter_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.PropertyGetter(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L227">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_PropertyGetter_" data-uid="Harmony.AccessTools.PropertyGetter*"></a>
|
|
<h4 id="Harmony_AccessTools_PropertyGetter_Type_System_String_" data-uid="Harmony.AccessTools.PropertyGetter(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The 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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the property cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_PropertySetter_Type_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.PropertySetter(Type%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L237">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_PropertySetter_" data-uid="Harmony.AccessTools.PropertySetter*"></a>
|
|
<h4 id="Harmony_AccessTools_PropertySetter_Type_System_String_" data-uid="Harmony.AccessTools.PropertySetter(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The 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">MethodInfo</span></td>
|
|
<td><p>A MethodInfo or null when type/name is null or when the property cannot be found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_ThrowMissingMemberException_Type_System_String___.md&value=---%0Auid%3A%20Harmony.AccessTools.ThrowMissingMemberException(Type%2CSystem.String%5B%5D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L793">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_ThrowMissingMemberException_" data-uid="Harmony.AccessTools.ThrowMissingMemberException*"></a>
|
|
<h4 id="Harmony_AccessTools_ThrowMissingMemberException_Type_System_String___" data-uid="Harmony.AccessTools.ThrowMissingMemberException(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">Type</span></td>
|
|
<td><span class="parametername">type</span></td>
|
|
<td><p>The class 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>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools_TypeByName_System_String_.md&value=---%0Auid%3A%20Harmony.AccessTools.TypeByName(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L31">View Source</a>
|
|
</span>
|
|
<a id="Harmony_AccessTools_TypeByName_" data-uid="Harmony.AccessTools.TypeByName*"></a>
|
|
<h4 id="Harmony_AccessTools_TypeByName_System_String_" data-uid="Harmony.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">Type</span></td>
|
|
<td><p>A Type</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="hidden-sm col-md-2" role="complementary">
|
|
<div class="sideaffix">
|
|
<div class="contribution">
|
|
<ul class="nav">
|
|
<li>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=Harmony_AccessTools.md&value=---%0Auid%3A%20Harmony.AccessTools%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Tools/AccessTools.cs/#L12" class="contribution-link">View Source</a>
|
|
</li>
|
|
</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>
|