75 int[][] array2 =
new int[
array.Length][];
76 for (
int i = 0; i <
array.Length; i++)
79 array2[i] =
new int[(parametersNoCopy.Length > args.Length) ? parametersNoCopy.Length : args.Length];
82 for (
int j = 0; j < args.Length; j++)
93 Type[] array4 =
new Type[args.Length];
94 for (
int i = 0; i < args.Length; i++)
102 bool flag = (bindingAttr &
BindingFlags.OptionalParamBinding) != 0;
103 for (
int i = 0; i <
array.Length; i++)
106 if (
array[i] ==
null)
111 if (parametersNoCopy2.Length == 0)
115 array2[num] = array2[i];
121 if (parametersNoCopy2.Length > args.Length)
123 for (j = args.Length; j < parametersNoCopy2.Length - 1 && parametersNoCopy2[j].
DefaultValue !=
DBNull.
Value; j++)
126 if (j != parametersNoCopy2.Length - 1)
130 if (parametersNoCopy2[j].DefaultValue ==
DBNull.
Value)
139 else if (parametersNoCopy2.Length < args.Length)
141 int num2 = parametersNoCopy2.Length - 1;
142 if (!parametersNoCopy2[num2].ParameterType.IsArray || !parametersNoCopy2[num2].
IsDefined(typeof(
ParamArrayAttribute), inherit:
true) || array2[i][num2] != num2)
150 int num3 = parametersNoCopy2.Length - 1;
151 if (parametersNoCopy2[num3].ParameterType.IsArray && parametersNoCopy2[num3].
IsDefined(typeof(
ParamArrayAttribute), inherit:
true) && array2[i][num3] == num3 && !parametersNoCopy2[num3].ParameterType.IsAssignableFrom(array4[num3]))
156 int num4 = ((
type !=
null) ? (parametersNoCopy2.Length - 1) : args.Length);
157 for (j = 0; j < num4; j++)
164 if (type2 == array4[array2[i][j]] || (flag && args[array2[i][j]] ==
Type.
Missing) || args[array2[i][j]] ==
null || type2 == typeof(
object))
170 if (array4[array2[i][j]] ==
null || !
CanChangePrimitive(args[array2[i][j]]?.GetType(), type2))
180 if (
type !=
null && j == parametersNoCopy2.Length - 1)
182 for (; j < args.Length; j++)
184 if (
type.IsPrimitive)
191 else if (!(array4[j] ==
null) && !
type.IsAssignableFrom(array4[j]) && (!array4[j].
IsCOMObject || !
type.IsInstanceOfType(args[j])))
197 if (j == args.Length)
199 array2[num] = array2[i];
212 state =
new BinderState((
int[])array2[0].Clone(), args.Length, array3[0] !=
null);
216 if (parametersNoCopy4.Length == args.Length)
218 if (array3[0] !=
null)
220 object[] array8 =
new object[parametersNoCopy4.Length];
221 int num8 = parametersNoCopy4.Length - 1;
224 ((
Array)array8[num8]).SetValue(args[num8], 0);
228 else if (parametersNoCopy4.Length > args.Length)
230 object[] array9 =
new object[parametersNoCopy4.Length];
232 for (i = 0; i < args.Length; i++)
236 for (; i < parametersNoCopy4.Length - 1; i++)
240 if (array3[0] !=
null)
252 object[] array10 =
new object[parametersNoCopy4.Length];
253 int num9 = parametersNoCopy4.Length - 1;
256 Array.
Copy(args, num9, (
Array)array10[num9], 0, args.Length - num9);
265 for (
int i = 1; i < num; i++)
284 state =
new BinderState((
int[])array2[num5].Clone(), args.Length, array3[num5] !=
null);
288 if (parametersNoCopy3.Length == args.Length)
290 if (array3[num5] !=
null)
292 object[] array5 =
new object[parametersNoCopy3.Length];
293 int num6 = parametersNoCopy3.Length - 1;
296 ((
Array)array5[num6]).SetValue(args[num6], 0);
300 else if (parametersNoCopy3.Length > args.Length)
302 object[] array6 =
new object[parametersNoCopy3.Length];
304 for (i = 0; i < args.Length; i++)
308 for (; i < parametersNoCopy3.Length - 1; i++)
312 if (array3[num5] !=
null)
324 object[] array7 =
new object[parametersNoCopy3.Length];
325 int num7 = parametersNoCopy3.Length - 1;
328 Array.
Copy(args, num7, (
Array)array7[num7], 0, args.Length - num7);
407 for (
int i = 0; i < types.Length; i++)
422 for (
int i = 0; i < array2.Length; i++)
425 if (parametersNoCopy.Length != types.Length)
430 for (j = 0; j < types.Length; j++)
433 if (types[j].MatchesParameterTypeExactly(parametersNoCopy[j]) || parameterType == typeof(
object))
444 type = signatureType.TryResolveAgainstGenericMethod(genericMethod);
462 if (j == types.Length)
464 array2[num++] = array2[i];
477 int[] array3 =
new int[types.Length];
478 for (
int i = 0; i < types.Length; i++)
482 for (
int i = 1; i < num; i++)
523 int num2 = ((indexes !=
null) ? indexes.Length : 0);
524 for (
int k = 0; k <
array.Length; k++)
529 if (indexParameters.Length != num2)
533 for (j = 0; j < num2; j++)
536 if (parameterType == indexes[j] || parameterType == typeof(
object))
557 if (returnType !=
null)
559 if (
array[k].PropertyType.IsPrimitive)
566 else if (!
array[k].PropertyType.IsAssignableFrom(returnType))
583 int[] array2 =
new int[num2];
584 for (
int k = 0; k < num2; k++)
588 for (
int k = 1; k < num; k++)
591 if (num4 == 0 && indexes !=
null)
593 num4 =
FindMostSpecific(
array[num3].GetIndexParameters(), array2,
null,
array[k].GetIndexParameters(), array2,
null, indexes,
null);