Represents a C# project for a specific compilation. When a project targets multiple frameworks, each target framework is represented by a separate Project instance.
Namespace: Metalama.Framework.Workspaces
Assembly: Metalama.Framework.Workspaces.dll
Syntax
public sealed class Project : IProjectSet, ICompilationSetResult, IIntrospectionCompilationDetailsRemarks
The Project class provides access to the project's source code through the SourceCode property, and to Metalama's transformed output through the TransformedCode property. It also exposes introspection information about aspect instances, transformations, and diagnostics.
Properties
| Name | Description |
|---|---|
| Advice | Gets the list of advice in the compilation. |
| AspectClasses | Gets the list of aspect classes in the compilation. |
| AspectInstances | Gets the list of aspect instances in the compilation. |
| AspectLayers | Gets the ordered list of aspect layers in the compilation. Note that when the current object represents several projects, the execution order of the aspect layers is not relevant. |
| Diagnostics | Gets the list of diagnostics reported by Metalama and by aspects. |
| HasMetalamaSucceeded | Gets a value indicating whether the processing of the compilation by Metalama was successful
for all projects in the current set. This property returns |
| IsMetalamaEnabled | Gets a value indicating whether Metalama is enabled on this project. |
| Name | Gets the project name (file name without extension). |
| Path | Gets the file path of the project's |
| RoslynCompilation | Gets the underlying Roslyn compilation for this project. |
| SourceCode | Gets the source code compilations for all projects in this set, before Metalama transformations are applied. |
| TargetFramework | Gets the target framework of this project, or |
| Transformations | Gets the list of transformations applied to source code. |
| TransformedCode | Gets the transformed code produced by Metalama for the compilations in this set. |
| Types | Gets all types defined in the project, including nested types. |
Methods
| Name | Description |
|---|---|
| GetDeclaration(string, string, string, bool) | |
| GetSubset(Predicate<Project>) | |
| ToString() |