PostSharp SDK6.7//Post­Sharp.​Sdk.​Code­Model Namespace/Property­Declaration Class

PropertyDeclaration Class

Represents a property (Property).
Inheritance Hierarchy

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.7.10.0 (6.7.10.0)
Syntax
C#
public sealed class PropertyDeclaration : MethodGroupDeclaration, 
	IRemovable, IMetadataDeclaration, IDeclaration, IElement, IModuleElement, 
	ITaggable, IWriteReflectionName, IMethodSignature, IEquatable<IMethodSignature>

The PropertyDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodPropertyDeclaration
Initializes a new instance of the PropertyDeclaration class
Properties
  NameDescription
Public propertyAttributes
Gets or sets the property attributes.
Public propertyCallingConvention
Gets or sets the calling convention.
Public propertyCanRead
Determines whether the current property can be read (i.e. has a get accessor).
Public propertyCanWrite
Determines whether the current property can be written (i.e. has a set accessor).
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyDeclaringType
Gets the parent TypeDefDeclaration.
(Inherited from MethodGroupDeclaration.)
Public propertyDefaultValue
Gets or sets the default value.
Public propertyGetter
Gets the getter accessor, or null if the current property has no getter.
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyIsStatic
Determines whether the current member is static.
(Inherited from MethodGroupDeclaration.)
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyName
Gets or sets the name of the current declaration.
(Inherited from NamedMetadataDeclaration.)
Public propertyOrdinal (Inherited from NamedPositionedMetadataDeclaration.)
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 propertyOriginalName (Inherited from NamedMetadataDeclaration.)
Public propertyParent
Gets the parent TypeDefDeclaration.
Public propertyParentMember
Gets the parent member of the current declaration.
(Inherited from MethodGroupDeclaration.)
Public propertyParentType
Gets the parent type of the current declaration.
(Inherited from MethodGroupDeclaration.)
Public propertyPropertyType
Gets or sets the type of the property value.
Public propertySetter
Gets the getter accessor, or null if the current property has no getter.
Public propertyVisibility
Gets the visibility of the current element.
(Inherited from MethodGroupDeclaration.)
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 methodDispose Obsolete. (Inherited from MetadataDeclaration.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetAccessor
Gets an accessor method.
(Inherited from MethodGroupDeclaration.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetSystemProperty()
Gets the system runtime property corresponding to the current property.
Public methodGetSystemProperty(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 methodRemove
Remove the current declaration from its parent.
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Inherited from MethodGroupDeclaration.)
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.
(Overrides MethodGroupDeclaration.WriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper).)
Extension Methods
  NameDescription
Public Extension MethodDefinitionMatchesReference (Defined by CompareExtensions.)
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
Properties are owned by types (TypeDefDeclaration).
See Also