MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeICompilation
Open sandboxFocus

ICompilation Interface

Represents a set of types compiled together. See also IProject.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface ICompilation : IAssembly, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable

Properties

Name Description
Cache

Gets a service that caches declarations of the current compilation. It is typically used to cache often-used declarations across aspect instances.

Comparers

Gets a equality comparers that can be used with declarations of this compilation.

IsPartial

Gets a value indicating whether the current compilation is partial, i.e. incomplete. Metalama uses partial compilations at design time, when only the closure of modified types are being incrementally recompiled.

ManagedResources

Gets the list of managed resources in the current compilation.

Project

Gets information about the project from which the compilation was created.

Methods

Name Description
GetAllAttributesOfType(INamedType, Boolean)

Gets all attributes of a given type in the current compilation, where the attribute type is given as an INamedType.

GetAllAttributesOfType(Type, Boolean)

Gets all attributes of a given type in the current compilation, where the attribute type is given as a System.Type.

GetDerivedTypes(INamedType, DerivedTypesOptions)

Gets the set of types, in the current compilation, that are derived from a given base type (given as an INamedType).

GetDerivedTypes(Type, DerivedTypesOptions)

Gets the set of types, in the current compilation, that are derived from a given base type (given as a System.Type).

Extension Methods

SymbolExtensions.GetRoslynCompilation(ICompilation)
SymbolExtensions.GetSemanticModel(ICompilation, SyntaxTree)
SymbolExtensions.TryGetDeclaration(ICompilation, ISymbol, out IDeclaration)
SymbolExtensions.GetDeclaration(ICompilation, ISymbol)