Interface IParameter
- Namespace
- ICSharpCode.Decompiler.TypeSystem
- Assembly
- ICSharpCode.Decompiler.dll
public interface IParameter : IVariable, ISymbol
- Inherited Members
- Extension Methods
Properties
HasConstantValueInSignature
Gets whether this parameter has a constant value when presented in method signature.
bool HasConstantValueInSignature { get; }
Property Value
Remarks
This can only be true
if the parameter is optional, and it's true for most
optional parameters. However it is possible to compile a parameter without a default value,
and some parameters handle their default values in an special way.
For example, DecimalConstantAttribute does not use normal constants,
so when DecimalConstants is false
we expose DecimalConstantAttribute
directly instead of a constant value.
On the call sites, though, we can still use the value inferred from the attribute.
IsIn
Gets whether this parameter is a C# 'in' parameter.
bool IsIn { get; }
Property Value
IsOptional
Gets whether this parameter is optional. The default value is given by the GetConstantValue(bool) function.
bool IsOptional { get; }
Property Value
IsOut
Gets whether this parameter is a C# 'out' parameter.
bool IsOut { get; }
Property Value
IsParams
Gets whether this parameter is a C# 'params' parameter.
bool IsParams { get; }
Property Value
IsRef
Gets whether this parameter is a C# 'ref' parameter.
bool IsRef { get; }
Property Value
Lifetime
C# 11 scoped annotation.
LifetimeAnnotation Lifetime { get; }
Property Value
Owner
Gets the owner of this parameter. May return null; for example when parameters belong to lambdas or anonymous methods.
IParameterizedMember? Owner { get; }
Property Value
ReferenceKind
Gets the reference kind of this parameter.
ReferenceKind ReferenceKind { get; }
Property Value
Methods
GetAttributes()
Gets the attributes on this parameter.
IEnumerable<IAttribute> GetAttributes()