Compilation
Gets or sets the compilation being transformed.
Declaration
public IPartialCompilation Compilation { get; set; }Property Value
| Type | Description |
|---|---|
| IPartialCompilation |
Remarks
You can modify the compilation by either:
- Using helper methods like RewriteAspectTargetsAsync(CSharpSyntaxRewriter, CancellationToken) which automatically update this property.
- Setting this property directly with a new IPartialCompilation derived from the current value using methods like WithSyntaxTreeTransformations(IReadOnlyList<SyntaxTreeTransformation>?).
The new compilation must be derived from the initial value; setting an unrelated compilation throws ArgumentOutOfRangeException.