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

◆ IsSimpleSignature()

static bool System.Runtime.CompilerServices.CallSite< T >.IsSimpleSignature ( MethodInfo invoke,
out Type[] sig )
inlinestaticprivate

Definition at line 208 of file CallSite.cs.

209 {
210 ParameterInfo[] parametersCached = invoke.GetParametersCached();
211 ContractUtils.Requires(parametersCached.Length != 0 && parametersCached[0].ParameterType == typeof(CallSite), "T");
212 Type[] array = new Type[(invoke.ReturnType != typeof(void)) ? parametersCached.Length : (parametersCached.Length - 1)];
213 bool result = true;
214 for (int i = 1; i < parametersCached.Length; i++)
215 {
217 if (parameterInfo.IsByRefParameter())
218 {
219 result = false;
220 }
221 array[i - 1] = parameterInfo.ParameterType;
222 }
223 if (invoke.ReturnType != typeof(void))
224 {
225 array[^1] = invoke.ReturnType;
226 }
227 sig = array;
228 return result;
229 }
static void Requires([DoesNotReturnIf(false)] bool precondition, string paramName)

References System.array, and System.Dynamic.Utils.ContractUtils.Requires().

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