Open sandboxFocus
  • TOC

Metalama Documentation

Getting started

Video tutorials

Conceptual documentation

Commented examples

API documentation

Aspect API

Metalama.​Framework.​Advising

Metalama.​Framework.​Aspects

Metalama.​Framework.​Code

Accessibility

Accessibility­Extensions

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

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

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.​Code­Fixes

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

Metalama.​Framework.​Validation

Extensions API

Patterns API

Flashtrace API

Introspection API

Advanced API

Post­Sharp API migration

  • Article

Interface INamedType

Represents a class, struct, interface, enum, or delegate.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface INamedType : IType, IEquatable<IType>, IGeneric, IMemberOrNamedType, INamespaceOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>, IEquatable<INamedType>

Properties

Name Description
AllEvents

Gets the list of events defined in the current type or inherited from the base types.

AllFields

Gets the list of fields defined in the current type or inherited from the base types. Note that fields can be promoted to properties by aspects, so a source code field can be represented in the Properties collection instead of the Fields collection.

AllFieldsAndProperties

Gets the union of the AllFields and AllProperties collections.

AllImplementedInterfaces

Gets the list of all interfaces (recursive) that the current type implements.

AllIndexers

Gets the list of indexers defined in the current type or inherited from the base types.

AllMethods

Gets the list of methods defined in the current type or inherited from the base type.

AllProperties

Gets the list of properties defined in the current type or inherited from the base types. Note that fields can be promoted to properties by aspects, so a source code field can be represented in the Properties collection instead of the Fields collection.

AllTypes

Gets the list of nested types defined in the current type or inherited from the base types.

BaseType

Gets the type from which the current type derives.

Constructors

Gets the list of constructors, including the implicit default constructor if any, but not the static constructor.

ContainingNamespace

Gets the namespace of the current type.

Definition

Gets the type definition with unassigned type parameters. When the current INamedType is not a generic type instance, returns the current INamedType.

Events

Gets the list of events defined in the current type, but not those inherited from the base types.

Fields

Gets the list of fields defined in the current type, but not those inherited from the base type. Note that fields can be promoted to properties by aspects, so a source code field can be represented in the Properties collection instead of the Fields collection.

FieldsAndProperties

Gets the union of the Fields and Properties collections.

Finalizer

Gets the finalizer of the type. For value types returns null.

HasDefaultConstructor
ImplementedInterfaces

Gets the list of interfaces that the current type implements.

Indexers

Gets the list of indexers defined in the current type.

IsReadOnly

Gets a value indicating whether the type is readonly.

IsRef

Gets a value indicating whether the type is a ref struct.

Methods

Gets the list of methods defined in the current type, but not those inherited from the base type, and not constructors or the finalizer.

Namespace
NestedTypes

Gets the nested types of the current type.

PrimaryConstructor

Gets the primary constructor if it is defined, otherwise returns null.

Properties

Gets the list of properties defined in the current type, but not those inherited from the base types. Note that fields can be promoted to properties by aspects, so a source code field can be represented in the Properties collection instead of the Fields collection.

StaticConstructor

Gets the static constructor.

TypeDefinition
UnderlyingType

Gets the underlying type of an enum, the non-nullable type of a nullable reference type, or the current type.

Methods

Name Description
IsSubclassOf(INamedType)

Determines whether the type if subclass of the given class or interface.

MakeGenericInstance(IReadOnlyList<IType>)
ToNullable()
ToRef()
TryFindImplementationForInterfaceMember(IMember, out IMember?)

Finds the the implementation of the given interface member that is valid for this type.

Extension Methods

  • Navigation