Compartilhar via


Proposal Construtores

Definição

Sobrecargas

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

Create uma proposta dada a uma ou mais edits, uma caret posição e uma opcionalcompletionState.

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)

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

Create uma proposta dada a uma ou mais edits, uma caret posição e uma opcionalcompletionState.

public Proposal (string? description, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Language.Proposals.ProposedEdit> edits, Microsoft.VisualStudio.Text.VirtualSnapshotPoint caret, Microsoft.VisualStudio.Language.Proposals.CompletionState? completionState = default, Microsoft.VisualStudio.Language.Proposals.ProposalFlags flags = Microsoft.VisualStudio.Language.Proposals.ProposalFlags.None, Func<bool>? commitAction = default, string? proposalId = default, string? acceptText = default, string? nextText = default, Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection? scope = default);
new Microsoft.VisualStudio.Language.Proposals.Proposal : string * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Language.Proposals.ProposedEdit> * Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Language.Proposals.CompletionState * Microsoft.VisualStudio.Language.Proposals.ProposalFlags * Func<bool> * string * string * string * Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection -> Microsoft.VisualStudio.Language.Proposals.Proposal
Public Sub New (description As String, edits As IReadOnlyList(Of ProposedEdit), caret As VirtualSnapshotPoint, Optional completionState As CompletionState = Nothing, Optional flags As ProposalFlags = Microsoft.VisualStudio.Language.Proposals.ProposalFlags.None, Optional commitAction As Func(Of Boolean) = Nothing, Optional proposalId As String = Nothing, Optional acceptText As String = Nothing, Optional nextText As String = Nothing, Optional scope As NormalizedSnapshotSpanCollection = Nothing)

Parâmetros

description
String

Uma descrição da intenção da proposta. Pode ser nulo.

edits
IReadOnlyList<ProposedEdit>

Uma edição proposta para a proposta.

caret
VirtualSnapshotPoint

O local do cursor no momento em que a proposta foi gerada.

completionState
CompletionState

O estado de conclusão no momento em que a proposta foi gerada.

flags
ProposalFlags

Sinalizadores associados à proposta.

commitAction
Func<Boolean>

Uma ação a ser executada quando a proposta é aceita. Se for nulo, edits será aplicado. Caso contrário, a ação será executada (e nenhuma edição será executada pelo serviço de sugestão e o valor retornado será passado para o manipulador de comandos.

proposalId
String

Um identificador exclusivo associado à proposta de uso com telemetria.

acceptText
String

Texto localizado mostrado ao lado do botão Aceitar na barra de dicas. Se for nulo, uma cadeia de caracteres localizada semelhante a "para aceitar" será usada.

nextText
String

Texto localizado mostrado ao lado do próximo botão de sugestão na barra de dicas. Se for nulo, uma cadeia de caracteres localizada semelhante à "próxima sugestão" será usada.

scope
NormalizedSnapshotSpanCollection

Escopo do código associado à proposta.

Aplica-se a

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

public Proposal (string? description, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Language.Proposals.ProposedEdit> edits, Microsoft.VisualStudio.Text.VirtualSnapshotPoint caret, Microsoft.VisualStudio.Language.Proposals.CompletionState? completionState, Microsoft.VisualStudio.Language.Proposals.ProposalFlags flags, Func<bool>? commitAction, string? proposalId, string? acceptText, string? previewText, string? nextText, Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection? scope);
new Microsoft.VisualStudio.Language.Proposals.Proposal : string * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Language.Proposals.ProposedEdit> * Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Language.Proposals.CompletionState * Microsoft.VisualStudio.Language.Proposals.ProposalFlags * Func<bool> * string * string * string * string * Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection -> Microsoft.VisualStudio.Language.Proposals.Proposal
Public Sub New (description As String, edits As IReadOnlyList(Of ProposedEdit), caret As VirtualSnapshotPoint, completionState As CompletionState, flags As ProposalFlags, commitAction As Func(Of Boolean), proposalId As String, acceptText As String, previewText As String, nextText As String, scope As NormalizedSnapshotSpanCollection)

Parâmetros

description
String
completionState
CompletionState
commitAction
Func<Boolean>
proposalId
String
acceptText
String
previewText
String
nextText
String

Aplica-se a

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

public Proposal (string? description, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Language.Proposals.ProposedEdit> edits, Microsoft.VisualStudio.Text.VirtualSnapshotPoint caret, Microsoft.VisualStudio.Language.Proposals.CompletionState? completionState, Microsoft.VisualStudio.Language.Proposals.ProposalFlags flags, Func<bool>? commitAction, string? proposalId, string? acceptText, string? previewText, string? nextText, string? undoDescription, Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection? scope);
new Microsoft.VisualStudio.Language.Proposals.Proposal : string * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.Language.Proposals.ProposedEdit> * Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Language.Proposals.CompletionState * Microsoft.VisualStudio.Language.Proposals.ProposalFlags * Func<bool> * string * string * string * string * string * Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection -> Microsoft.VisualStudio.Language.Proposals.Proposal
Public Sub New (description As String, edits As IReadOnlyList(Of ProposedEdit), caret As VirtualSnapshotPoint, completionState As CompletionState, flags As ProposalFlags, commitAction As Func(Of Boolean), proposalId As String, acceptText As String, previewText As String, nextText As String, undoDescription As String, scope As NormalizedSnapshotSpanCollection)

Parâmetros

description
String
completionState
CompletionState
commitAction
Func<Boolean>
proposalId
String
acceptText
String
previewText
String
nextText
String
undoDescription
String

Aplica-se a