MetalamaAPI documentationAdvanced APIMetalama.​Compiler
Open sandboxFocus

Metalama.Compiler Namespace

Classes

DiagnosticFilteringRequest

InitializeServicesContext

Context passed to a source transformer when InitializeServices(InitializeServicesContext) is called.

InitializeServicesOptions

Options of a ISourceTransformer, exposed on Options.

Intrinsics

ManagedResource

Represents a managed resource.

MetalamaCompilerAnnotations

Exposes the Microsoft.CodeAnalysis.SyntaxAnnotations used by Metalama.Compiler.

MetalamaCompilerInfo

SyntaxTreeTransformation

SyntaxTreeTransformationKind

TransformedFileMapping

TransformedFilesMap

Contains information about files written by Metalama when the MetalamaEmitCompilerTransformedFiles project property is set.

TransformerAttribute

Place this attribute onto a type to cause it to be considered a source transformer.

TransformerContext

Context passed to a source transformer when Execute(TransformerContext) is called. The implementation can modify the compilation using the methods AddSyntaxTrees(SyntaxTree[]), ReplaceSyntaxTree(SyntaxTree, SyntaxTree) or AddResources(ManagedResource[]). It can report a diagnostic using ReportDiagnostic(Diagnostic) or suppress diagnostics using RegisterDiagnosticFilter(SuppressionDescriptor, Action<DiagnosticFilteringRequest>).

TransformerOptions

Options of a ISourceTransformer, exposed on Options.

TransformerOrderAttribute

Applying this attribute on an assembly specifies the execution order of transformers it knows about, including transformers inside the assembly itself.

Interfaces

ISourceTransformer

The interface required to implement a source transformer.

ISourceTransformerWithServices