TransformerContext Class
Context passed to a source transformer when Execute(TransformerContext) is called. The implementation can modify the compilation using the methods AddSyntaxTrees(params SyntaxTree[]), ReplaceSyntaxTree(SyntaxTree, SyntaxTree) or AddResources(params ManagedResource[]). It can report a diagnostic using ReportDiagnostic(Diagnostic) or suppress diagnostics using RegisterDiagnosticFilter(SuppressionDescriptor, Action<DiagnosticFilteringRequest>).
Namespace: Metalama.Compiler
Assembly: Metalama.Compiler.Interface.dll
Syntax
public sealed class TransformerContext
Properties
Name | Description |
---|---|
AnalyzerConfigOptionsProvider | Gets the AnalyzerConfigOptionsProvider, which allows to access |
Compilation | Gets the original Compilation. Transformers typically modify the compilation by using methods on this TransformerContext, though such modifications are not reflection on this property. |
Options | Gets options of the current TransformerContext. |
Resources | Gets the list of managed resources. |