MetalamaAPI documentationAdvanced APIMetalama.​Framework.​Engine.​Code­ModelPartial­Compilation­Extensions
Open sandboxFocus

PartialCompilationExtensions Class

Extension methods for the IPartialCompilation interface.

Inheritance
PartialCompilationExtensions
Namespace: Metalama.Framework.Engine.CodeModel
Assembly: Metalama.Framework.Sdk.dll
Syntax
public static class PartialCompilationExtensions : Object

Methods

Name Description
AddSyntaxTrees(IPartialCompilation, SyntaxTree[])
AddSyntaxTrees(IPartialCompilation, IEnumerable<SyntaxTree>)
GetParseOptions(IPartialCompilation)

Gets Microsoft.CodeAnalysis.ParseOptions that should be used when adding new syntax trees to this compilation.

RewriteSyntaxTreesAsync(IPartialCompilation, CSharpSyntaxRewriter, ProjectServiceProvider, CancellationToken)
RewriteSyntaxTreesAsync(IPartialCompilation, Func<SyntaxNode, CSharpSyntaxRewriter>, ProjectServiceProvider, CancellationToken)
UpdateSyntaxTrees(IPartialCompilation, Func<SyntaxNode, CancellationToken, SyntaxNode>, CancellationToken)

Updates the syntax trees of a given IPartialCompilation by providing a function that maps a Microsoft.CodeAnalysis.SyntaxTree to a transformed Microsoft.CodeAnalysis.SyntaxTree.

UpdateSyntaxTrees(IPartialCompilation, Func<SyntaxTree, SyntaxTree>, CancellationToken)
UpdateSyntaxTrees(IPartialCompilation, Func<SyntaxTree, CancellationToken, SyntaxTree>, CancellationToken)

Updates the syntax trees of a given IPartialCompilation by providing a function that maps a Microsoft.CodeAnalysis.SyntaxTree to a transformed Microsoft.CodeAnalysis.SyntaxTree.