IMethod Interface |
Defines the functionalities that are common to all representations
of a method (MethodDefDeclaration, MethodRefDeclaration,
MethodSpecDeclaration).
Namespace: PostSharp.Sdk.CodeModel
Assembly: PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
C#
public interface IMethod : IMethodSignature, IModuleElement, IEquatable<IMethodSignature>, IMember, IMetadataDeclaration, IDeclaration, IElement, ITaggable, IWriteReflectionName, INamed, IGeneric, IEquatable<IMethod>
The IMethod type exposes the following members.
Name | Description | |
---|---|---|
Attributes |
Gets the attributes of the method.
| |
CallingConvention |
Gets the method calling convention.
(Inherited from IMethodSignature.) | |
CustomAttributes |
Gets the collection of custom attributes.
(Inherited from IMetadataDeclaration.) | |
DeclaringAssembly |
Gets the declaring assembly.
(Inherited from IModuleElement.) | |
DeclaringType |
Gets the declaring type.
(Inherited from IMember.) | |
Domain |
Gets the Domain to which the current element belongs.
(Inherited from IElement.) | |
GenericParameterCount |
Gets the number of generic parameters or arguments (i.e. the arity).
(Inherited from IMethodSignature.) | |
IsAbstract |
Determines whether the method is abstract.
| |
IsGenericDefinition |
Determines whether the current instance is a generic definition, i.e. whether it can
be used to construct generic instances.
(Inherited from IGeneric.) | |
IsGenericInstance |
Determines whether the current instance is a generic instance, i.e. whether it has
been constructed from a generic definition.
(Inherited from IGeneric.) | |
IsNew |
Determines whether the method takes a new slot.
| |
IsSealed |
Determines whether the method is sealed.
| |
IsStatic |
Determines whether the current member is static.
(Inherited from IMember.) | |
IsVirtual |
Determines whether the method is virtual.
| |
MetadataToken |
Gets the metadata token of the current declaration.
(Inherited from IMetadataDeclaration.) | |
Module |
Gets the declaring module.
(Inherited from IModuleElement.) | |
Name | (Inherited from INamed.) | |
ParameterCount |
Gets the number of parameters.
(Inherited from IMethodSignature.) | |
Parent |
Gets the direct parent of the current element.
(Inherited from IElement.) | |
ParentMember |
Gets the parent member of the current declaration.
(Inherited from IMetadataDeclaration.) | |
ParentType |
Gets the parent type of the current declaration.
(Inherited from IMetadataDeclaration.) | |
ReturnType |
Gets the return type.
(Inherited from IMethodSignature.) | |
Visibility |
Gets the Visibility of the current member.
(Inherited from IMember.) |
Name | Description | |
---|---|---|
ContainsGenericArguments | (Inherited from IGeneric.) | |
Equals(T) | Indicates whether the current object is equal to another object of the same type. (Inherited from IEquatable<IMethod>.) | |
Equals(T) | (Inherited from IEquatable<IMethodSignature>.) | |
GetGenericContext |
Gets the generic context inside the scope of the generic instance.
(Inherited from IGeneric.) | |
GetGenericMethod |
If this is a MethodDefDeclaration or a MethodRefDeclaration, returns itself.
If this is a MethodSpecDeclaration, returns the method-def-declaration or the method-ref-declaration that it's derived from. | |
GetMethodDefinition() |
Finds in the current domain the MethodDefDeclaration corresponding
to the current method with default BindingOptions.
| |
GetMethodDefinition(BindingOptions) |
Finds in the current domain the MethodDefDeclaration corresponding
to the current method and specifies BindingOptions.
| |
GetParameterType |
Gets the type of a parameter given its position.
(Inherited from IMethodSignature.) | |
GetReflectionObject |
Gets the system, runtime object (Type, FieldInfo, MethodInfo,
ParameterInfo, ...) corresponding to the current declaration.
(Inherited from IMetadataDeclaration.) | |
GetSystemMethod(Type[], Type[]) |
Gets the system runtime method corresponding to the current method.
| |
GetSystemMethod(Type[], Type[], BindingOptions) |
Gets the system runtime method corresponding to the current method.
| |
GetTag<T> |
Gets a tag associated with the current declaration.
(Inherited from ITaggable.) | |
GetTokenType |
Gets the metadata token type of the current declaration.
(Inherited from IMetadataDeclaration.) | |
MapGenericArguments |
Resolves all generic arguments in the current method signature.
(Inherited from IMethodSignature.) | |
ReferencesAnyGenericArgument |
Determines whether generic arguments are used in the current signature.
(Inherited from IMethodSignature.) | |
SetTag<T> |
Set a tag to the current declaration.
(Inherited from ITaggable.) | |
Translate |
Translates the current element so that it can be used in a given module.
(Inherited from IModuleElement.) | |
TranslateMethod |
Translates the current method so that it is meaningful in another
module than the one to which it primarily belong.
| |
TranslateMethodSignature |
Translates the current method signature so that it is meaningful in another
module than the one to which it primarily belong.
(Inherited from IMethodSignature.) | |
WriteReflectionName(StringBuilder, ReflectionNameOptions) |
Writes the name of the current declaration to a StringBuilder.
(Inherited from IWriteReflectionName.) | |
WriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper) |
Writes the name of the current declaration to a StringBuilder and
specifies a NameMapper.
(Inherited from IWriteReflectionName.) |
Name | Description | |
---|---|---|
DefinitionMatchesReference(IMethod, BindingOptions) | Overloaded. (Defined by CompareExtensions.) | |
DefinitionMatchesReference(IMethodSignature, BindingOptions) | Overloaded. (Defined by CompareExtensions.) | |
FindOverride | (Defined by MethodExtensions.) | |
GetCallOpCode | (Defined by MethodExtensions.) | |
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.) | |
IsExternallyVisible |
Determines whether a member is visible outside its assembly.
(Defined by VisibilityHelper.) | |
IsPublic |
Determines whether a member is visible outside its assembly.
(Defined by VisibilityHelper.) | |
IsVisible |
Determines whether a member is visible from a given scope.
(Defined by VisibilityHelper.) |