Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MakeUpdateDelegate()

T System.Runtime.CompilerServices.CallSite< T >.MakeUpdateDelegate ( )
inlinepackage

Definition at line 177 of file CallSite.cs.

178 {
180 MethodInfo invokeMethod = typeFromHandle.GetInvokeMethod();
182 {
183 MethodInfo methodInfo = null;
184 MethodInfo methodInfo2 = null;
185 if (invokeMethod.ReturnType == typeof(void))
186 {
188 {
189 methodInfo = typeof(UpdateDelegates).GetMethod("UpdateAndExecuteVoid" + sig.Length, BindingFlags.Static | BindingFlags.NonPublic);
190 methodInfo2 = typeof(UpdateDelegates).GetMethod("NoMatchVoid" + sig.Length, BindingFlags.Static | BindingFlags.NonPublic);
191 }
192 }
194 {
195 methodInfo = typeof(UpdateDelegates).GetMethod("UpdateAndExecute" + (sig.Length - 1), BindingFlags.Static | BindingFlags.NonPublic);
196 methodInfo2 = typeof(UpdateDelegates).GetMethod("NoMatch" + (sig.Length - 1), BindingFlags.Static | BindingFlags.NonPublic);
197 }
198 if (methodInfo != null)
199 {
200 s_cachedNoMatch = (T)(object)methodInfo2.MakeGenericMethod(sig).CreateDelegate(typeFromHandle);
201 return (T)(object)methodInfo.MakeGenericMethod(sig).CreateDelegate(typeFromHandle);
202 }
203 }
206 }
static bool IsSimpleSignature(MethodInfo invoke, out Type[] sig)
Definition CallSite.cs:208
T CreateCustomNoMatchDelegate(MethodInfo invoke)
Definition CallSite.cs:300
T CreateCustomUpdateDelegate(MethodInfo invoke)
Definition CallSite.cs:232

References System.Runtime.CompilerServices.CallSite< T >.CreateCustomNoMatchDelegate(), System.Runtime.CompilerServices.CallSite< T >.CreateCustomUpdateDelegate(), System.Linq.Expressions.Compiler.DelegateHelpers.GetActionType(), System.Linq.Expressions.Compiler.DelegateHelpers.GetFuncType(), System.Runtime.CompilerServices.CallSite< T >.IsSimpleSignature(), System.Runtime.CompilerServices.CallSite< T >.s_cachedNoMatch, and System.T.

Referenced by System.Runtime.CompilerServices.CallSite< T >.GetUpdateDelegate().