Class SyntaxReference
A reference to a syntax node.
Inheritance
System.Object
SyntaxReference
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Loretta.CodeAnalysis
Assembly: Loretta.CodeAnalysis.dll
Syntax
public abstract class SyntaxReference
Properties
| Improve this Doc View SourceSpan
The span of the node referenced.
Declaration
public abstract TextSpan Span { get; }
Property Value
Type | Description |
---|---|
TextSpan |
SyntaxTree
The syntax tree that this references a node within.
Declaration
public abstract SyntaxTree SyntaxTree { get; }
Property Value
Type | Description |
---|---|
SyntaxTree |
Methods
| Improve this Doc View SourceGetSyntax(CancellationToken)
Retrieves the original referenced syntax node.
This action may cause a parse to happen to recover the syntax node.
Declaration
public abstract SyntaxNode GetSyntax(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
SyntaxNode | The original referenced syntax node. |
GetSyntaxAsync(CancellationToken)
Retrieves the original referenced syntax node.
This action may cause a parse to happen to recover the syntax node.
Declaration
public virtual Task<SyntaxNode> GetSyntaxAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SyntaxNode> | The original referenced syntax node. |