PostSharp SDK6.6//Post­Sharp.​Sdk.​Code­Model Namespace/Parameter­Declaration Class

ParameterDeclaration Class

Represents a method parameter (ParamDef).
Inheritance Hierarchy
System.Object
  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.6.3.0 (6.6.3.0)
Syntax
C#
public sealed class ParameterDeclaration : MetadataDeclaration, 
	ICloneable, ICloneableModuleElement, IModuleElement, IPositioned, IWriteReflectionName, 
	INamedMetadataDeclaration, IMetadataDeclaration, IDeclaration, IElement, ITaggable, 
	INamed

The ParameterDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodParameterDeclaration()
Initializes a new ParameterDeclaration.
Public methodParameterDeclaration(Int32, String, ITypeSignature)
Initializes a new ParameterDeclaration and sets some of its properties.
Properties
  NameDescription
Public propertyAttributes
Gets or sets the parameters attributes.
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyDefaultValue
Gets or sets the default value.
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyMarshalType
Gets or sets the parameter marshal type.
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyName
Gets or sets the parameter name.
Public propertyOrdinal
Gets or sets the parameter ordinal, i.e. its position in the list of parameters of the parent method.
Public propertyOriginalDeclaration
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.)
Public propertyParameterType
Gets or sets the parameter type.
Public propertyParentMember
Gets the parent member of the current declaration.
(Overrides MetadataDeclaration.ParentMember.)
Public propertyParentType
Gets the parent type of the current declaration.
(Overrides MetadataDeclaration.ParentType.)
Methods
  NameDescription
Public methodClearCache
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.)
Public methodClone()
Returns a copy of the current parameter, targeted to the same module as the current parameter.
Public methodClone(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;
Public methodClone(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.
Public methodStatic memberCreateReturnParameter
Creates a new instance of ParameterDeclaration representing a return parameter.
Public methodDispose Obsolete. (Inherited from MetadataDeclaration.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetSystemParameter(Type[], Type[])
Gets the system runtime parameter corresponding to the current parameter.
Public methodGetSystemParameter(Type[], Type[], BindingOptions)
Public methodGetTag<T>
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.)
Public methodGetTokenType
Gets the TokenType of the derived declaration.
(Overrides MetadataDeclaration.GetTokenType().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Overrides MetadataDeclaration.ToString().)
Public methodWriteReflectionName(StringBuilder, ReflectionNameOptions)
Writes the name of the current declaration to a StringBuilder.
Public methodWriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper)
Writes the name of the current declaration to a StringBuilder and specifies a NameMapper.
Extension Methods
  NameDescription
Public Extension MethodGetDisplayName
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.)
Public Extension MethodGetReflectionName()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.)
Public Extension MethodGetReflectionName(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.)
Public Extension MethodGetReflectionName(ReflectionNameOptions, NameMapper)Overloaded.
Gets the name of a given declaration, constructed using given options.
(Defined by WriteReflectionNameExtensions.)
Remarks
Parameters are owned by methods (MethodDefDeclaration).
See Also