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

MethodSpecDeclaration Class

Represents a method specification (MethodSpec), i.e. the construction of a concrete generic method.
Inheritance Hierarchy
System.Object
  PostSharp.Sdk.CodeModel.Element
    PostSharp.Sdk.CodeModel.Declaration
      PostSharp.Sdk.CodeModel.MetadataDeclaration
        PostSharp.Sdk.CodeModel.MethodSpecDeclaration

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 MethodSpecDeclaration : MetadataDeclaration, 
	IMethod, IMethodSignature, IModuleElement, IEquatable<IMethodSignature>, 
	IMember, IMetadataDeclaration, IDeclaration, IElement, ITaggable, 
	IWriteReflectionName, INamed, IGeneric, IEquatable<IMethod>, 
	IGenericInstance, INamedMetadataDeclaration

The MethodSpecDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodMethodSpecDeclaration
Initializes a new instance of the MethodSpecDeclaration class
Properties
  NameDescription
Public propertyAttributes
Gets the attributes of the method.
Public propertyCallingConvention
Gets the method calling convention.
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyDeclaringType
Gets the declaring type.
Public propertyIsAbstract
Determines whether the method is abstract.
Public propertyIsGenericInstance
Public propertyIsNew
Determines whether the method takes a new slot.
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyIsSealed
Determines whether the method is sealed.
Public propertyIsStatic
Determines whether the current member is static.
Public propertyIsVirtual
Determines whether the method is virtual.
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyName
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 propertyParameterCount
Gets the number of parameters.
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.)
Public propertyReturnType
Gets the return type.
Public propertyVisibility
Gets the Visibility of the current member.
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 methodContainsGenericArguments
Public methodDispose Obsolete. (Inherited from MetadataDeclaration.)
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEquals(IMethod)
Indicates whether the current object is equal to another object of the same type.
Public methodEquals(IMethodSignature)
Indicates whether the current object is equal to another object of the same type.
Public methodGetGenericContext
Gets the generic context inside the scope of the generic instance.
Public methodGetGenericMethod
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetMethodDefinition()
Finds in the current domain the MethodDefDeclaration corresponding to the current method with default BindingOptions.
Public methodGetMethodDefinition(BindingOptions)
Finds in the current domain the MethodDefDeclaration corresponding to the current method and specifies BindingOptions.
Public methodGetParameterType
Gets the type of a parameter given its position.
Public methodGetSystemMethod(Type[], Type[])
Gets the system runtime method corresponding to the current method.
Public methodGetSystemMethod(Type[], Type[], BindingOptions)
Gets the system runtime method corresponding to the current method.
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 methodReferencesAnyGenericArgument
Determines whether generic arguments are used in the current signature.
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Inherited from MetadataDeclaration.)
Public methodTranslate
Public methodTranslateMethodSignature
Translates the current method signature so that it is meaningful in another module than the one to which it primarily belong.
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 MethodDefinitionMatchesReference(IMethod, BindingOptions)Overloaded. (Defined by CompareExtensions.)
Public Extension MethodDefinitionMatchesReference(IMethodSignature, BindingOptions)Overloaded. (Defined by CompareExtensions.)
Public Extension MethodFindOverride (Defined by MethodExtensions.)
Public Extension MethodGetCallOpCode (Defined by MethodExtensions.)
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.)
Public Extension MethodIsExternallyVisible
Determines whether a member is visible outside its assembly.
(Defined by VisibilityHelper.)
Public Extension MethodIsPublic
Determines whether a member is visible outside its assembly.
(Defined by VisibilityHelper.)
Public Extension MethodIsVisible
Determines whether a member is visible from a given scope.
(Defined by VisibilityHelper.)
See Also