Represents a syntax node in source code. Using Metalama.Framework.Sdk you can use ToSyntaxNodeOrToken to convert it to a Roslyn object.
Implements
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct SourceReference : IDiagnosticLocationConstructors
| Name | Description |
|---|---|
| SourceReference(object, ISourceReferenceImpl) |
Properties
| Name | Description |
|---|---|
| IsImplementationPart | Gets a value indicating whether the current syntax node is contains the implementation of the declaration.
This property evaluates to |
| Kind | Gets the |
| NodeOrToken | Gets the Roslyn |
| Span | Gets source file, line and column for the node. |
Methods
| Name | Description |
|---|---|
| GetText(bool) | Gets the text representation (i.e. the source code) of the current syntax node or token. |
| ToString() | Gets the content of the node or token (without trivia). |