Share via


CompletionState Constructors

Definition

Overloads

CompletionState(String, SnapshotSpan, Boolean, ImageElement)

Create a new CompletionState.

CompletionState(String, SnapshotSpan, Boolean, ImageElement, Object)

Create a new CompletionState.

CompletionState(String, SnapshotSpan, Boolean, ImageElement, Object, Boolean)

Create a new CompletionState.

CompletionState(String, SnapshotSpan, Boolean, ImageElement)

Create a new CompletionState.

public CompletionState (string selectedItem, Microsoft.VisualStudio.Text.SnapshotSpan applicableToSpan, bool isSoftSelection, Microsoft.VisualStudio.Text.Adornments.ImageElement icon);
new Microsoft.VisualStudio.Language.Proposals.CompletionState : string * Microsoft.VisualStudio.Text.SnapshotSpan * bool * Microsoft.VisualStudio.Text.Adornments.ImageElement -> Microsoft.VisualStudio.Language.Proposals.CompletionState
Public Sub New (selectedItem As String, applicableToSpan As SnapshotSpan, isSoftSelection As Boolean, icon As ImageElement)

Parameters

selectedItem
String

The selected item from the completion list. Note this corresponds to the insertion text of the completion item.

applicableToSpan
SnapshotSpan

The applicableTo span of the current IntelliSense session.

isSoftSelection
Boolean

Whether the item is selected as a soft selection in IntelliSense.

icon
ImageElement

The icon associated with the selected completion item.

Applies to

CompletionState(String, SnapshotSpan, Boolean, ImageElement, Object)

Create a new CompletionState.

public CompletionState (string selectedItem, Microsoft.VisualStudio.Text.SnapshotSpan applicableToSpan, bool isSoftSelection, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, object? underlyingCompletionItem);
new Microsoft.VisualStudio.Language.Proposals.CompletionState : string * Microsoft.VisualStudio.Text.SnapshotSpan * bool * Microsoft.VisualStudio.Text.Adornments.ImageElement * obj -> Microsoft.VisualStudio.Language.Proposals.CompletionState
Public Sub New (selectedItem As String, applicableToSpan As SnapshotSpan, isSoftSelection As Boolean, icon As ImageElement, underlyingCompletionItem As Object)

Parameters

selectedItem
String

The selected item from the completion list. Note this corresponds to the insertion text of the completion item.

applicableToSpan
SnapshotSpan

The applicableTo span of the current IntelliSense session.

isSoftSelection
Boolean

Whether the item is selected as a soft selection in IntelliSense.

icon
ImageElement

The icon associated with the selected completion item.

underlyingCompletionItem
Object

A WeakReference on the actual completion item selected in IntelliSense.

Remarks

A WeakReference is used to store the underlyingCompletionItem because proposals can persist long after the completion session is dismissed and we do not want to pin anything associated with the session.

Applies to

CompletionState(String, SnapshotSpan, Boolean, ImageElement, Object, Boolean)

Create a new CompletionState.

public CompletionState (string selectedItem, Microsoft.VisualStudio.Text.SnapshotSpan applicableToSpan, bool isSoftSelection, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, object? underlyingCompletionItem, bool isBuilderSelected);
new Microsoft.VisualStudio.Language.Proposals.CompletionState : string * Microsoft.VisualStudio.Text.SnapshotSpan * bool * Microsoft.VisualStudio.Text.Adornments.ImageElement * obj * bool -> Microsoft.VisualStudio.Language.Proposals.CompletionState
Public Sub New (selectedItem As String, applicableToSpan As SnapshotSpan, isSoftSelection As Boolean, icon As ImageElement, underlyingCompletionItem As Object, isBuilderSelected As Boolean)

Parameters

selectedItem
String

The selected item from the completion list. Note this corresponds to the insertion text of the completion item.

applicableToSpan
SnapshotSpan

The applicableTo span of the current IntelliSense session.

isSoftSelection
Boolean

Whether the item is selected as a soft selection in IntelliSense.

icon
ImageElement

The icon associated with the selected completion item.

underlyingCompletionItem
Object

A WeakReference on the actual completion item selected in IntelliSense.

isBuilderSelected
Boolean

Whether the completion item is in builder mode.

Remarks

A WeakReference is used to store the underlyingCompletionItem because proposals can persist long after the completion session is dismissed and we do not want to pin anything associated with the session.

Applies to