Metalama 1.0 / / Metalama Documentation / Aspect API Documentation / Metalama.​Framework.​Code / IMethod

Interface IMethod

Represents a method, but not a constructor.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface IMethod : IMethodBase, IHasParameters, IMember, IGeneric, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable

Properties

Name Description
DeclaringMember

Gets the parent property or event when the current IMethod represents a property or event accessor, otherwise null.

ExplicitInterfaceImplementations

Gets a list of interface methods that this method explicitly implements.

Invokers

Gets an object that allows to invoke the current method.

IsReadOnly

Gets a value indicating whether the method is readonly.

MethodDefinition

Gets the method definition with unassigned type parameters. When the current IMethod is neither a generic method instance nor a method of a generic type, returns the current IMethod.

MethodKind

Gets the kind of method (such as Default or PropertyGet.

OperatorKind

Gets a value indicating the type of operator the methods represents.

OverriddenMethod

Gets the base method that is overridden or hidden by the current method.

ReturnParameter

Gets an object representing the method return type and custom attributes, or null for methods that don't have return types: constructors and finalizers.

ReturnType

Gets the method return type.

Methods

Name Description
ToMethodInfo()

Gets a MethodInfo that represents the current method at run time.

Extension Methods

DeclarationExtensions.Aspects<T>(IDeclaration)
DeclarationExtensions.Annotations<T>(IDeclaration)
DeclarationExtensions.GetClosestNamedType(IDeclaration)
DeclarationExtensions.GetTopNamedType(IDeclaration)
DeclarationExtensions.ForCompilation<T>(T, ICompilation, ReferenceResolutionOptions)
GenericExtensions.IsSelfOrAncestorGeneric(IMemberOrNamedType)
GenericExtensions.GetOriginalDefinition(IDeclaration)
GenericExtensions.GetOriginalDefinition(IMemberOrNamedType)
GenericExtensions.GetOriginalDefinition(IMember)
GenericExtensions.GetOriginalDefinition(IMethod)
GenericExtensions.ConstructGenericInstance(IMethod, IType[])
GenericExtensions.ConstructGenericInstance(IMethod, Type[])
GenericExtensions.ForTypeInstance(IMethod, INamedType)
MemberExtensions.IsOverridable(IMember)
MethodExtensions.GetIteratorInfo(IMethod)
MethodExtensions.GetAsyncInfo(IMethod)
MetricsExtensions.Metrics<TExtensible>(TExtensible)
SymbolExtensions.GetSymbol(IDeclaration)
SymbolExtensions.GetSymbol(IMethodBase)
PresentingExtensions.AsHyperlink(Object)