Open sandboxFocus
  • TOC

Metalama Documentation

Getting started

Conceptual documentation

Commented examples

API documentation

Aspect API

Metalama.​Framework.​Advising

Metalama.​Framework.​Aspects

Metalama.​Framework.​Code

Accessibility

Accessibility­Extensions

Accessibility­Flags

Async­Info

Attribute­Extensions

Code­Display­Context

Code­Display­Format

Compilation­Extensions

Constructor­Collection­Extensions

Constructor­Initializer­Kind

Conversion­Kind

Declaration­Enhancements<T>

Declaration­Extensions

Declaration­Kind

Declaration­Origin­Kind

Derived­Types­Options

Enumerable­Kind

Execution­Scope

Generic­Extensions

IAnnotation

IAnnotation<T>

IAspect­Declaration­Origin

IAssembly

IAssembly­Identity

IAttribute

IAttribute­Data

ICompilation

ICompilation­Element

IConstructor

IDeclaration

IDeclaration­Cache

IDeclaration­Factory

IDeclaration­Origin

IDisplayable

IEvent

IExpression

IField

IField­Or­Property

IField­Or­Property­Or­Indexer

IGeneric

IGeneric­Context

IHas­Accessors

IHas­Parameters

IHas­Type

IIndexer

IManaged­Resource

IMember

IMember­Or­Named­Type

IMethod

IMethod­Base

INamed­Declaration

INamed­Type

INamespace

INamespace­Or­Named­Type

IObject­Creation­Expression

IParameter

IProperty

IProperty­Or­Indexer

IRef

IRef<T>

ISource­Expression

ISource­Reference­Impl

Iterator­Info

IType

IType­Parameter

Member­Extensions

Method­Collection­Extensions

Method­Extensions

Method­Kind

Named­Type­Extensions

Namespace­Extensions

Operator­Category

Operator­Kind

Operator­Kind­Extensions

Ref­Comparison

Reference­Kinds

Reference­Kinds­Extension

Ref­Extensions

Ref­Kind

Ref­Kind­Extensions

Reflection­Extensions

Serializable­Declaration­Id

Serializable­Type­Id

Source­Reference

Source­Span

Special­Type

Typed­Constant

Type­Extensions

Type­Factory

Type­Kind

Type­Kind­Constraint

Type­Parameter­Kind

Variance­Kind

Writeability

Metalama.​Framework.​Code.​Collections

Metalama.​Framework.​Code.​Comparers

Metalama.​Framework.​Code.​Declaration­Builders

Metalama.​Framework.​Code.​Invokers

Metalama.​Framework.​Code.​Syntax­Builders

Metalama.​Framework.​Code.​Types

Metalama.​Framework.​Diagnostics

Metalama.​Framework.​Eligibility

Metalama.​Framework.​Fabrics

Metalama.​Framework.​Metrics

Metalama.​Framework.​Options

Metalama.​Framework.​Project

Metalama.​Framework.​Run­Time

Metalama.​Framework.​Serialization

Metalama.​Framework.​Services

Metalama.​Framework.​Utilities

Extensions API

Patterns API

Flashtrace API

Introspection API

Advanced API

Post­Sharp API migration

  • Article

Method OfExactSignature

OfExactSignature(IMethodCollection, string, IReadOnlyList<IType>, IReadOnlyList<RefKind>?, bool?)

Gets a method that exactly matches the specified signature.

Declaration
public static IMethod? OfExactSignature(this IMethodCollection methods, string name, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds = null, bool? isStatic = null)
Parameters
Type Name Description
IMethodCollection methods

A collection of methods.

string name

Name of the method.

IReadOnlyList<IType> parameterTypes

List of parameter types.

IReadOnlyList<RefKind> refKinds

List of parameter reference kinds, or null if all parameters should be by-value.

bool? isStatic

Staticity of the method.

Returns
Type Description
IMethod

A IMethod that matches the given signature.

OfExactSignature(IMethodCollection, IMethod, bool)

Gets a method that exactly matches the signature of the specified method.

Declaration
public static IMethod? OfExactSignature(this IMethodCollection methods, IMethod signatureTemplate, bool matchIsStatic = true)
Parameters
Type Name Description
IMethodCollection methods

A collection of methods.

IMethod signatureTemplate

Method signature of which to should be considered.

bool matchIsStatic

Value indicating whether the staticity of the method should be matched.

Returns
Type Description
IMethod

A IMethod that matches the given signature.

OfExactSignature(IIndexerCollection, IReadOnlyList<IType>, IReadOnlyList<RefKind>?)

Gets an indexer that exactly matches the specified signature.

Declaration
public static IIndexer? OfExactSignature(this IIndexerCollection indexers, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds = null)
Parameters
Type Name Description
IIndexerCollection indexers

A collection of indexers.

IReadOnlyList<IType> parameterTypes

List of parameter types.

IReadOnlyList<RefKind> refKinds

List of parameter reference kinds, or null if all parameters should be by-value.

Returns
Type Description
IIndexer

An IIndexer that matches the given signature.

OfExactSignature(IIndexerCollection, IIndexer)

Gets an indexer that exactly matches the signature of the specified method.

Declaration
public static IIndexer? OfExactSignature(this IIndexerCollection indexers, IIndexer signatureTemplate)
Parameters
Type Name Description
IIndexerCollection indexers

A collection of indexers.

IIndexer signatureTemplate

Indexer signature of which to should be considered.

Returns
Type Description
IIndexer

A IMethod that matches the given signature.