API Browser

Member group

GetSemanticModelAsync

Declaring type: Document
Namespace: Raven.CodeAnalysis
Assembly: Raven.CodeAnalysis.dll
Source file: Document.cs

Overloads / Variants

GetSemanticModelAsync

func GetSemanticModelAsync(cancellationToken: CancellationToken = default) -> Task<SemanticModel?>

Source file: Document.cs

Asynchronously gets the semantic model for this document, if supported.

Parameters

Name Type Description
cancellationToken CancellationToken

Return value

Task<SemanticModel?>

GetSemanticModelAsync

func GetSemanticModelAsync(position: int, cancellationToken: CancellationToken = default) -> Task<SemanticModel?>

Source file: Document.cs

Asynchronously gets the semantic model that owns an authored position in this document.

Parameters

Name Type Description
position Int32
cancellationToken CancellationToken

Return value

Task<SemanticModel?>

Remarks

For a document containing declaration-granular local macros, positions inside a direct macro declaration or a declaration marked with Raven.CodeAnalysis.Macros.LocalMacroAttribute resolve through the compile-time macro projection. Other positions resolve through the consumer projection. Query nodes from the returned model's Raven.CodeAnalysis.SemanticModel.SyntaxTree.