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

◆ CheckArguments()

Span< object > System.Reflection.MethodBase.CheckArguments ( ref StackAllocedArguments stackArgs,
ReadOnlySpan< object > parameters,
Binder binder,
BindingFlags invokeAttr,
CultureInfo culture,
Signature sig )
inlineprotectedinherited

Definition at line 161 of file MethodBase.cs.

162 {
163 Span<object> result = ((parameters.Length <= 4) ? MemoryMarshal.CreateSpan(ref stackArgs._arg0, parameters.Length) : new Span<object>(new object[parameters.Length]));
164 ParameterInfo[] array = null;
165 for (int i = 0; i < parameters.Length; i++)
166 {
167 object obj = parameters[i];
168 RuntimeType runtimeType = sig.Arguments[i];
169 if (obj == Type.Missing)
170 {
171 if (array == null)
172 {
174 }
175 if (array[i].DefaultValue == DBNull.Value)
176 {
177 throw new ArgumentException(SR.Arg_VarMissNull, "parameters");
178 }
179 obj = array[i].DefaultValue;
180 }
181 result[i] = runtimeType.CheckValue(obj, binder, culture, invokeAttr);
182 }
183 return result;
184 }
virtual ParameterInfo[] GetParametersNoCopy()

References System.SR.Arg_VarMissNull, System.Signature.Arguments, System.array, System.RuntimeType.CheckValue(), System.culture, System.Reflection.MethodBase.GetParametersNoCopy(), System.ReadOnlySpan< T >.Length, System.Type.Missing, System.obj, and System.DBNull.Value.

Referenced by System.Reflection.RuntimeConstructorInfo.Invoke(), System.Reflection.RuntimeConstructorInfo.Invoke(), System.Reflection.RuntimeMethodInfo.Invoke(), System.Reflection.Emit.DynamicMethod.Invoke(), and System.Reflection.RuntimeMethodInfo.InvokeOneParameter().