API Browser

Method

GetCompletionsAsync

func GetCompletionsAsync(position: int, cancellationToken: CancellationToken = default) -> Task<ImmutableArray<CompletionItem>>

Declaring type: SemanticModel
Namespace: Raven.CodeAnalysis
Assembly: Raven.CodeAnalysis.dll
Source file: SemanticModel.AsyncStateMachine.cs, SemanticModel.Binding.cs, SemanticModel.Captures.cs, SemanticModel.ControlFlowAnalysis.cs, SemanticModel.DataFlowAnalysis.cs, SemanticModel.MacroExpansionDocument.cs, SemanticModel.MacroFragments.cs, SemanticModel.MatchExhaustiveness.cs, SemanticModel.MemberSignatures.cs, SemanticModel.MemberSymbolState.cs, SemanticModel.Operations.cs, SemanticModel.Scripting.cs, SemanticModel.cs

Gets completion items available at a position in this semantic model's syntax tree asynchronously.

Parameters

Name Type Description
position Int32 The zero-based position in the syntax tree.
cancellationToken CancellationToken Token used to cancel the operation.

Return value

Task<ImmutableArray<CompletionItem>>

A materialized set of completion items.

Errors

Error Description
T:System.ArgumentOutOfRangeException Thrown when position is outside the tree bounds.