Provides extension methods to bridge between the Metalama code model (IDeclaration, IType, etc.) and the Roslyn symbol model (ISymbol).
Namespace: Metalama.Framework.Engine.CodeModel
Assembly: Metalama.Framework.Sdk.dll
Syntax
public static class SymbolExtensionsRemarks
This class enables aspect weavers to convert Metalama declarations to Roslyn symbols for use with the Roslyn API. It also provides methods to go from Roslyn symbols back to Metalama declarations.
Common operations:
- GetSymbol(ICompilationElement, bool): Get the Roslyn ISymbol for a Metalama declaration.
- GetDeclaration(ICompilation, ISymbol): Get the Metalama IDeclaration for a Roslyn symbol.
- GetRoslynCompilation(ICompilation): Get the underlying Roslyn Compilation.
- GetSemanticModel(ICompilation, SyntaxTree): Get a SemanticModel for a syntax tree.