Files
2026-06-04 11:42:34 +02:00

77 lines
1.8 KiB
C#

using System;
using System.Reflection;
namespace System.Runtime.Remoting.Messaging
{
// Token: 0x020003D7 RID: 983
internal class ArgInfo
{
// Token: 0x06002692 RID: 9874 RVA: 0x0007EFF8 File Offset: 0x0007D1F8
public ArgInfo(MethodBase method, ArgInfoType type)
{
this._method = method;
ParameterInfo[] parameters = this._method.GetParameters();
this._paramMap = new int[parameters.Length];
this._inoutArgCount = 0;
if (type == ArgInfoType.In)
{
for (int i = 0; i < parameters.Length; i++)
{
if (!parameters[i].ParameterType.IsByRef)
{
this._paramMap[this._inoutArgCount++] = i;
}
}
}
else
{
for (int j = 0; j < parameters.Length; j++)
{
if (parameters[j].ParameterType.IsByRef || parameters[j].IsOut)
{
this._paramMap[this._inoutArgCount++] = j;
}
}
}
}
// Token: 0x06002693 RID: 9875 RVA: 0x0007F0CC File Offset: 0x0007D2CC
public int GetInOutArgIndex(int inoutArgNum)
{
return this._paramMap[inoutArgNum];
}
// Token: 0x06002694 RID: 9876 RVA: 0x0007F0D8 File Offset: 0x0007D2D8
public virtual string GetInOutArgName(int index)
{
return this._method.GetParameters()[this._paramMap[index]].Name;
}
// Token: 0x06002695 RID: 9877 RVA: 0x0007F0F4 File Offset: 0x0007D2F4
public int GetInOutArgCount()
{
return this._inoutArgCount;
}
// Token: 0x06002696 RID: 9878 RVA: 0x0007F0FC File Offset: 0x0007D2FC
public object[] GetInOutArgs(object[] args)
{
object[] array = new object[this._inoutArgCount];
for (int i = 0; i < this._inoutArgCount; i++)
{
array[i] = args[this._paramMap[i]];
}
return array;
}
// Token: 0x04000F0E RID: 3854
private int[] _paramMap;
// Token: 0x04000F0F RID: 3855
private int _inoutArgCount;
// Token: 0x04000F10 RID: 3856
private MethodBase _method;
}
}