final class · System.Reflection
ParameterInfo
public final class ParameterInfo
A parameter of a method or constructor.
- Tipo
- final class
- Espacio de nombres
- System.Reflection
- Ensamblado
- System.Core
- Acceso
- public, final
- Archivo fuente
Reflection.ant
Herencia
- Clases base
-
AnyParameterInfo
Propiedades
Métodos
GetCustomAttributes() : any[]
#
The custom attributes written on the parameter ([Tag("n")] i32 n).
override ToString() : str
#
Miembros privados e internos (5)
Miembros heredados (4)
GetTypemétodo de AnyUndescribedmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
ParameterInfo en Antril, descompilado a partir de su Larva HIR.
// System.Reflection.ParameterInfo — System.Core (decompiled from Larva HIR)
import System;
into namespace System.Reflection
{
/// A parameter of a method or constructor.
public final class ParameterInfo
{
readonly str name;
readonly Type type;
readonly i32 position;
internal:
/// The method or constructor it belongs to (set when that is made).
MethodBase? member;
new(str name, Type type, i32 position)
{
this.name = name;
this.type = type;
this.position = position;
}
public:
/// The custom attributes written on the parameter (`[Tag("n")] i32 n`).
GetCustomAttributes() : any[]
{
if (member is MethodBase owner)
return owner.Describer.Attributes(4000000 + owner.Index * 256 + position);
return [];
}
GetCustomAttributes(Type attributeType) : any[] => Attributes.Of(GetCustomAttributes(), attributeType);
IsDefined(Type attributeType) : bool => GetCustomAttributes(attributeType).Length > 0;
override ToString() : str => type.FullName + " " + name;
str Name
{
get => name;
}
Type ParameterType
{
get => type;
}
i32 Position
{
get => position;
}
}
}