ParameterDeclaration Class |
Represents a method parameter (ParamDef).
System.Object
PostSharp.Sdk.CodeModel.Element
PostSharp.Sdk.CodeModel.Declaration
PostSharp.Sdk.CodeModel.MetadataDeclaration
PostSharp.Sdk.CodeModel.ParameterDeclaration
PostSharp.Sdk.CodeModel.Element
PostSharp.Sdk.CodeModel.Declaration
PostSharp.Sdk.CodeModel.MetadataDeclaration
PostSharp.Sdk.CodeModel.ParameterDeclaration
Namespace: PostSharp.Sdk.CodeModel
Assembly: PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
C#
public sealed class ParameterDeclaration : MetadataDeclaration, ICloneable, ICloneableModuleElement, IModuleElement, IPositioned, IWriteReflectionName, INamedMetadataDeclaration, IMetadataDeclaration, IDeclaration, IElement, ITaggable, INamed
The ParameterDeclaration type exposes the following members.
Name | Description | |
---|---|---|
ParameterDeclaration() |
Initializes a new ParameterDeclaration.
| |
ParameterDeclaration(Int32, String, ITypeSignature) |
Initializes a new ParameterDeclaration and sets some of its properties.
|
Name | Description | |
---|---|---|
Attributes |
Gets or sets the parameters attributes.
| |
CustomDebuggingInformation | (Inherited from Declaration.) | |
DefaultValue |
Gets or sets the default value.
| |
IsOriginal |
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.) | |
MarshalType |
Gets or sets the parameter marshal type.
| |
MetadataToken |
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.) | |
Name |
Gets or sets the parameter name.
| |
Ordinal |
Gets or sets the parameter ordinal, i.e. its position
in the list of parameters of the parent method.
| |
OriginalDeclaration |
When the declaration represents another declaration in the source assembly, this property refers to this declaration.
When using GetReflectionObject(Type[], Type[], BindingOptions), the original declaration should actually be retrieved.
(Inherited from MetadataDeclaration.) | |
ParameterType |
Gets or sets the parameter type.
| |
ParentMember |
Gets the parent member of the current declaration.
(Overrides MetadataDeclaration.ParentMember.) | |
ParentType |
Gets the parent type of the current declaration.
(Overrides MetadataDeclaration.ParentType.) |
Name | Description | |
---|---|---|
ClearCache |
Clear the cache (typically mapping to System.Reflection or,
if the current element is a reference, to the related definition)
of the current Element and all its children.
(Inherited from Element.) | |
Clone() |
Returns a copy of the current parameter, targeted to the same module
as the current parameter.
| |
Clone(ModuleDeclaration) |
Returns a copy of the current parameter and allows to translate it
to a different module as the module of the current parameter,
without copying custom attributes;
| |
Clone(ModuleDeclaration, ITypeSignature) |
Returns a copy of the current parameter and allows to translate it
to a different module as the module of the current parameter (without copying custom attributes and the default value),
and allows the parameter type of the clone to be replaced.
| |
CreateReturnParameter |
Creates a new instance of ParameterDeclaration representing a return parameter.
| |
Dispose | Obsolete. (Inherited from MetadataDeclaration.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetSystemParameter(Type[], Type[]) |
Gets the system runtime parameter corresponding to the current parameter.
| |
GetSystemParameter(Type[], Type[], BindingOptions) | ||
GetTag<T> |
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.) | |
GetTokenType |
Gets the TokenType of the derived declaration.
(Overrides MetadataDeclaration.GetTokenType().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
SetTag<T> |
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.) | |
ToString | (Overrides MetadataDeclaration.ToString().) | |
WriteReflectionName(StringBuilder, ReflectionNameOptions) |
Writes the name of the current declaration to a StringBuilder.
| |
WriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper) |
Writes the name of the current declaration to a StringBuilder and
specifies a NameMapper.
|
Name | Description | |
---|---|---|
GetDisplayName |
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.) | |
GetReflectionName() | Overloaded.
Gets the name of a given declaration and returns a string that is compatible with the result of the ToString
method of system reflection objects.
(Defined by WriteReflectionNameExtensions.) | |
GetReflectionName(ReflectionNameOptions) | Overloaded.
Gets the name of a given declaration and returns a string that is compatible with the result of the ToString
method of system reflection objects.
(Defined by WriteReflectionNameExtensions.) | |
GetReflectionName(ReflectionNameOptions, NameMapper) | Overloaded.
Gets the name of a given declaration, constructed using given options.
(Defined by WriteReflectionNameExtensions.) |
Parameters are
owned by methods (MethodDefDeclaration).