mirror of
https://github.com/pardeike/Harmony
synced 2026-06-08 16:40:38 +00:00
536 lines
25 KiB
HTML
536 lines
25 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 MethodInvoker
|
|
</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="title" content="Class MethodInvoker
|
|
">
|
|
<meta name="generator" content="docfx 2.48.1.0">
|
|
|
|
<link rel="shortcut icon" href="../favicon.ico">
|
|
<link rel="stylesheet" href="../styles/docfx.vendor.css">
|
|
<link rel="stylesheet" href="../styles/docfx.css">
|
|
<link rel="stylesheet" href="../styles/main.css">
|
|
<meta property="docfx:navrel" content="../toc.html">
|
|
<meta property="docfx:tocrel" content="toc.html">
|
|
|
|
|
|
|
|
</head>
|
|
<body data-spy="scroll" data-target="#affix" data-offset="120">
|
|
<div id="wrapper">
|
|
<header>
|
|
|
|
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../logo.svg" alt="">
|
|
</a>
|
|
</div>
|
|
<div class="collapse navbar-collapse" id="navbar">
|
|
<form class="navbar-form navbar-right" role="search" id="search">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="subnav navbar navbar-default">
|
|
<div class="container hide-when-search" id="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div role="main" class="container body-content hide-when-search">
|
|
|
|
<div class="sidenav hide-when-search">
|
|
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
|
|
<div class="sidetoggle collapse" id="sidetoggle">
|
|
<div id="sidetoc"></div>
|
|
</div>
|
|
</div>
|
|
<div class="article row grid-right">
|
|
<div class="col-md-10">
|
|
<article class="content wrap" id="_content" data-uid="HarmonyLib.MethodInvoker">
|
|
|
|
|
|
<h1 id="HarmonyLib_MethodInvoker" data-uid="HarmonyLib.MethodInvoker" class="text-break">Class MethodInvoker
|
|
</h1>
|
|
<div class="markdown level0 summary"><p>A helper class to invoke method with delegates</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">MethodInvoker</span></div>
|
|
</div>
|
|
<div class="inheritedMembers">
|
|
<h5>Inherited Members</h5>
|
|
<div>
|
|
<span class="xref">System.Object.ToString()</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.Equals(System.Object)</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.GetHashCode()</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.GetType()</span>
|
|
</div>
|
|
<div>
|
|
<span class="xref">System.Object.MemberwiseClone()</span>
|
|
</div>
|
|
</div>
|
|
<h6><strong>Namespace</strong>: <a class="xref" href="HarmonyLib.html">HarmonyLib</a></h6>
|
|
<h6><strong>Assembly</strong>: 0Harmony.dll</h6>
|
|
<h5 id="HarmonyLib_MethodInvoker_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public class MethodInvoker</code></pre>
|
|
</div>
|
|
<h3 id="constructors">Constructors
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=HarmonyLib_MethodInvoker__ctor_System_Boolean_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.%23ctor(System.Boolean)%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/Extras/MethodInvoker.cs/#L67">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker__ctor_" data-uid="HarmonyLib.MethodInvoker.#ctor*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker__ctor_System_Boolean_" data-uid="HarmonyLib.MethodInvoker.#ctor(System.Boolean)">MethodInvoker(Boolean)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a MethodInvoker that can create a fast invocation handler</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public MethodInvoker(bool directBoxValueAccess = false)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Boolean</span></td>
|
|
<td><span class="parametername">directBoxValueAccess</span></td>
|
|
<td><p>
|
|
This option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array
|
|
passed to the fast invocation handler.
|
|
Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object.
|
|
Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array.
|
|
<example>For example,
|
|
<pre><code>var val = 5;
|
|
var box = (object)val;
|
|
var arr = new object[] { box };
|
|
handler(arr); // for a method with parameter signature: ref/out/in int</code></pre>
|
|
</example>
|
|
</p>
|
|
<p>
|
|
If <code>directBoxValueAccess</code> is <code>true</code>, the boxed value object is accessed (and potentially updated) directly when the handler is called,
|
|
such that all references to the boxed object reflect the potentially updated value.
|
|
In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both <code>box</code> and <code>arr[0]</code>
|
|
now reflect the value 10. Note that the original <code>val</code> is not updated, since boxing always copies the value into the new boxed value object.
|
|
</p>
|
|
<p>
|
|
If <code>directBoxValueAccess</code> is <code>false</code> (default), the boxed value object in the arguments array is replaced with a "reboxed" value object,
|
|
such that potential updates to the value are reflected only in the arguments array.
|
|
In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only <code>arr[0]</code> now reflects the value 10.
|
|
</p>
|
|
</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=HarmonyLib_MethodInvoker_Emit_System_Reflection_Emit_ILGenerator_System_Reflection_Emit_OpCode_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.Emit(System.Reflection.Emit.ILGenerator%2CSystem.Reflection.Emit.OpCode)%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/Extras/MethodInvoker.cs/#L174">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_Emit_" data-uid="HarmonyLib.MethodInvoker.Emit*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_Emit_System_Reflection_Emit_ILGenerator_System_Reflection_Emit_OpCode_" data-uid="HarmonyLib.MethodInvoker.Emit(System.Reflection.Emit.ILGenerator,System.Reflection.Emit.OpCode)">Emit(ILGenerator, OpCode)</h4>
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">protected virtual void Emit(ILGenerator il, OpCode opcode)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.ILGenerator</span></td>
|
|
<td><span class="parametername">il</span></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.OpCode</span></td>
|
|
<td><span class="parametername">opcode</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=HarmonyLib_MethodInvoker_Emit_System_Reflection_Emit_ILGenerator_System_Reflection_Emit_OpCode_System_Type_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.Emit(System.Reflection.Emit.ILGenerator%2CSystem.Reflection.Emit.OpCode%2CSystem.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/Extras/MethodInvoker.cs/#L180">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_Emit_" data-uid="HarmonyLib.MethodInvoker.Emit*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_Emit_System_Reflection_Emit_ILGenerator_System_Reflection_Emit_OpCode_System_Type_" data-uid="HarmonyLib.MethodInvoker.Emit(System.Reflection.Emit.ILGenerator,System.Reflection.Emit.OpCode,System.Type)">Emit(ILGenerator, OpCode, Type)</h4>
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">protected virtual void Emit(ILGenerator il, OpCode opcode, Type type)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.ILGenerator</span></td>
|
|
<td><span class="parametername">il</span></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.OpCode</span></td>
|
|
<td><span class="parametername">opcode</span></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Type</span></td>
|
|
<td><span class="parametername">type</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=HarmonyLib_MethodInvoker_EmitCall_System_Reflection_Emit_ILGenerator_System_Reflection_Emit_OpCode_System_Reflection_MethodInfo_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.EmitCall(System.Reflection.Emit.ILGenerator%2CSystem.Reflection.Emit.OpCode%2CSystem.Reflection.MethodInfo)%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/Extras/MethodInvoker.cs/#L186">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_EmitCall_" data-uid="HarmonyLib.MethodInvoker.EmitCall*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_EmitCall_System_Reflection_Emit_ILGenerator_System_Reflection_Emit_OpCode_System_Reflection_MethodInfo_" data-uid="HarmonyLib.MethodInvoker.EmitCall(System.Reflection.Emit.ILGenerator,System.Reflection.Emit.OpCode,System.Reflection.MethodInfo)">EmitCall(ILGenerator, OpCode, MethodInfo)</h4>
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">protected virtual void EmitCall(ILGenerator il, OpCode opcode, MethodInfo methodInfo)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.ILGenerator</span></td>
|
|
<td><span class="parametername">il</span></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.OpCode</span></td>
|
|
<td><span class="parametername">opcode</span></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.MethodInfo</span></td>
|
|
<td><span class="parametername">methodInfo</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=HarmonyLib_MethodInvoker_EmitFastInt_System_Reflection_Emit_ILGenerator_System_Int32_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.EmitFastInt(System.Reflection.Emit.ILGenerator%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/Extras/MethodInvoker.cs/#L204">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_EmitFastInt_" data-uid="HarmonyLib.MethodInvoker.EmitFastInt*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_EmitFastInt_System_Reflection_Emit_ILGenerator_System_Int32_" data-uid="HarmonyLib.MethodInvoker.EmitFastInt(System.Reflection.Emit.ILGenerator,System.Int32)">EmitFastInt(ILGenerator, Int32)</h4>
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">protected virtual void EmitFastInt(ILGenerator il, int value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Emit.ILGenerator</span></td>
|
|
<td><span class="parametername">il</span></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><span class="parametername">value</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=HarmonyLib_MethodInvoker_GetHandler_System_Reflection_MethodInfo_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.GetHandler(System.Reflection.MethodInfo)%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/Extras/MethodInvoker.cs/#L30">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_GetHandler_" data-uid="HarmonyLib.MethodInvoker.GetHandler*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_GetHandler_System_Reflection_MethodInfo_" data-uid="HarmonyLib.MethodInvoker.GetHandler(System.Reflection.MethodInfo)">GetHandler(MethodInfo)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a fast invocation handler from a method and its declaring type's module</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static FastInvokeHandler GetHandler(MethodInfo methodInfo)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.MethodInfo</span></td>
|
|
<td><span class="parametername">methodInfo</span></td>
|
|
<td><p>The method to invoke</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="HarmonyLib.FastInvokeHandler.html">FastInvokeHandler</a></td>
|
|
<td><p>The fast invocation handler</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=HarmonyLib_MethodInvoker_GetHandler_System_Reflection_MethodInfo_System_Reflection_Module_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.GetHandler(System.Reflection.MethodInfo%2CSystem.Reflection.Module)%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/Extras/MethodInvoker.cs/#L22">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_GetHandler_" data-uid="HarmonyLib.MethodInvoker.GetHandler*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_GetHandler_System_Reflection_MethodInfo_System_Reflection_Module_" data-uid="HarmonyLib.MethodInvoker.GetHandler(System.Reflection.MethodInfo,System.Reflection.Module)">GetHandler(MethodInfo, Module)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a fast invocation handler from a method and a module</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static FastInvokeHandler GetHandler(MethodInfo methodInfo, Module module)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.MethodInfo</span></td>
|
|
<td><span class="parametername">methodInfo</span></td>
|
|
<td><p>The method to invoke</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Module</span></td>
|
|
<td><span class="parametername">module</span></td>
|
|
<td><p>The module context</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="HarmonyLib.FastInvokeHandler.html">FastInvokeHandler</a></td>
|
|
<td><p>The fast invocation handler</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=HarmonyLib_MethodInvoker_Handler_System_Reflection_MethodInfo_System_Reflection_Module_.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker.Handler(System.Reflection.MethodInfo%2CSystem.Reflection.Module)%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/Extras/MethodInvoker.cs/#L76">View Source</a>
|
|
</span>
|
|
<a id="HarmonyLib_MethodInvoker_Handler_" data-uid="HarmonyLib.MethodInvoker.Handler*"></a>
|
|
<h4 id="HarmonyLib_MethodInvoker_Handler_System_Reflection_MethodInfo_System_Reflection_Module_" data-uid="HarmonyLib.MethodInvoker.Handler(System.Reflection.MethodInfo,System.Reflection.Module)">Handler(MethodInfo, Module)</h4>
|
|
<div class="markdown level1 summary"><p>Creates a fast invocation handler from a method and a module</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public FastInvokeHandler Handler(MethodInfo methodInfo, Module module)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.MethodInfo</span></td>
|
|
<td><span class="parametername">methodInfo</span></td>
|
|
<td><p>The method to invoke</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Reflection.Module</span></td>
|
|
<td><span class="parametername">module</span></td>
|
|
<td><p>The module context</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="HarmonyLib.FastInvokeHandler.html">FastInvokeHandler</a></td>
|
|
<td><p>The fast invocation handler</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="hidden-sm col-md-2" role="complementary">
|
|
<div class="sideaffix">
|
|
<div class="contribution">
|
|
<ul class="nav">
|
|
<li>
|
|
<a href="https://github.com/pardeike/Harmony/new/master/apiSpec/new?filename=HarmonyLib_MethodInvoker.md&value=---%0Auid%3A%20HarmonyLib.MethodInvoker%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/pardeike/Harmony/blob/master/Harmony/Extras/MethodInvoker.cs/#L16" 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>
|