未验证 提交 dc7571c6 编写于 作者: C campersau 提交者: GitHub

Remove unused ParamTypes method from DispatchProxyGenerator (#51119)

上级 5a2df345
......@@ -427,7 +427,7 @@ private MethodBuilder AddMethodImpl(MethodInfo mi, int methodInfoIndex)
// object[] args = new object[paramCount];
il.Emit(OpCodes.Nop);
GenericArray<object> argsArr = new GenericArray<object>(il, ParamTypes(parameters, true).Length);
GenericArray<object> argsArr = new GenericArray<object>(il, parameters.Length);
for (int i = 0; i < parameters.Length; i++)
{
......@@ -512,18 +512,6 @@ private MethodBuilder AddMethodImpl(MethodInfo mi, int methodInfoIndex)
return mdb;
}
private static Type[] ParamTypes(ParameterInfo[] parms, bool noByRef)
{
Type[] types = new Type[parms.Length];
for (int i = 0; i < parms.Length; i++)
{
types[i] = parms[i].ParameterType;
if (noByRef && types[i].IsByRef)
types[i] = types[i].GetElementType()!;
}
return types;
}
// TypeCode does not exist in ProjectK or ProjectN.
// This lookup method was copied from PortableLibraryThunks\Internal\PortableLibraryThunks\System\TypeThunks.cs
// but returns the integer value equivalent to its TypeCode enum.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册