Share via


Proposal Class

Definition

Convenience class that implements ProposalBase.

public class Proposal : Microsoft.VisualStudio.Language.Proposals.ProposalBase
type Proposal = class
    inherit ProposalBase
Public Class Proposal
Inherits ProposalBase
Inheritance
Proposal

Constructors

Proposal(String, IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState, ProposalFlags, Func<Boolean>, String, String, String, NormalizedSnapshotSpanCollection)

Create a proposal given one or more edits, a caret position and an optional completionState.

Proposal(String, IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState, ProposalFlags, Func<Boolean>, String, String, String, String, NormalizedSnapshotSpanCollection)
Proposal(String, IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState, ProposalFlags, Func<Boolean>, String, String, String, String, String, NormalizedSnapshotSpanCollection)

Properties

AcceptText

Localized text shown next to the accept button in the hint bar. If empty, a localized string similar to "to accept" will be used.

Caret
CommitAction
CompletionState
Description

A description of the proposal.

Edits

A list of edits that will be applied if the proposal is accepted.

Flags
NextText

Localized text shown next to the next suggestion button in the hint bar. If empty, a localized string similar to "next suggestion" will be used.

PreviewText

Localized text shown next to the accept button in the hint bar when displaying markers only using MarkersOnlyThenGrayText. If null or empty, a localized string similar to "to preview" will be used.

ProposalId
Scope
UndoDescription

Localized text used to describe the edit made by the proposal in the undo list. If null or empty, a localized string similar to "completion" will be used.

Methods

ToString()
TryCreateProposal(String, IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState, ProposalFlags, Func<Boolean>, String, String, String, NormalizedSnapshotSpanCollection)

Try to create a proposal given one or more edits, a caret position and an optional completionState.

TryCreateProposal(String, IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState, ProposalFlags, Func<Boolean>, String, String, String, String, NormalizedSnapshotSpanCollection)
TryCreateProposal(String, IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState, ProposalFlags, Func<Boolean>, String, String, String, String, String, NormalizedSnapshotSpanCollection)
ValidateEdits(IReadOnlyList<ProposedEdit>, VirtualSnapshotPoint, CompletionState)

Determine if a sequence of edits is valid given the caret position and an optional completionState.

Applies to