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 ForTypeInstance

ForTypeInstance(IMemberOrNamedType, INamedType)

Declaration
public static IMemberOrNamedType ForTypeInstance(this IMemberOrNamedType declaration, INamedType typeInstance)
Parameters
Type Name Description
IMemberOrNamedType declaration
INamedType typeInstance
Returns
Type Description
IMemberOrNamedType

ForTypeInstance(INamedType, INamedType)

Returns a representation of the current nested INamedType, but for a different generic instance of the declaring type.

Declaration
public static INamedType ForTypeInstance(this INamedType declaration, INamedType typeInstance)
Parameters
Type Name Description
INamedType declaration
INamedType typeInstance
Returns
Type Description
INamedType

ForTypeInstance(IField, INamedType)

Returns a representation of the current IField, but for a different generic instance of the declaring type.

Declaration
public static IField ForTypeInstance(this IField declaration, INamedType typeInstance)
Parameters
Type Name Description
IField declaration
INamedType typeInstance
Returns
Type Description
IField

ForTypeInstance(IMethod, INamedType)

Returns a representation of the current IMethod, but for a different generic instance of the declaring type.

Declaration
public static IMethod ForTypeInstance(this IMethod declaration, INamedType typeInstance)
Parameters
Type Name Description
IMethod declaration
INamedType typeInstance
Returns
Type Description
IMethod

ForTypeInstance(IProperty, INamedType)

Returns a representation of the current IProperty, but for a different generic instance of the declaring type.

Declaration
public static IProperty ForTypeInstance(this IProperty declaration, INamedType typeInstance)
Parameters
Type Name Description
IProperty declaration
INamedType typeInstance
Returns
Type Description
IProperty

ForTypeInstance(IEvent, INamedType)

Returns a representation of the current IEvent, but for a different generic instance of the declaring type.

Declaration
public static IEvent ForTypeInstance(this IEvent declaration, INamedType typeInstance)
Parameters
Type Name Description
IEvent declaration
INamedType typeInstance
Returns
Type Description
IEvent

ForTypeInstance(IConstructor, INamedType)

Returns a representation of the current IConstructor, but for a different generic instance of the declaring type.

Declaration
public static IConstructor ForTypeInstance(this IConstructor declaration, INamedType typeInstance)
Parameters
Type Name Description
IConstructor declaration
INamedType typeInstance
Returns
Type Description
IConstructor