다음을 통해 공유


ProposalBrokerBase.RequestProposals 메서드

정의

지정된 caretcompletionState의 적용 가능한 ProposalSourceBase모든 제안서를 요청합니다. groupingDelay 다른 원본을 포기하기 전에 첫 번째 ProposalSourceBase 에서 완료까지 전달할 수 있습니다.

public abstract Microsoft.VisualStudio.Threading.AsyncQueue<Microsoft.VisualStudio.Language.Proposals.ProposalCollectionBase> RequestProposals (Microsoft.VisualStudio.Text.VirtualSnapshotPoint caret, Microsoft.VisualStudio.Language.Proposals.CompletionState? completionState, Microsoft.VisualStudio.Language.Proposals.ProposalScenario scenario, char triggeringCharacter, TimeSpan groupingDelay, System.Threading.CancellationToken cancel);
abstract member RequestProposals : Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Language.Proposals.CompletionState * Microsoft.VisualStudio.Language.Proposals.ProposalScenario * char * TimeSpan * System.Threading.CancellationToken -> Microsoft.VisualStudio.Threading.AsyncQueue<Microsoft.VisualStudio.Language.Proposals.ProposalCollectionBase>
Public MustOverride Function RequestProposals (caret As VirtualSnapshotPoint, completionState As CompletionState, scenario As ProposalScenario, triggeringCharacter As Char, groupingDelay As TimeSpan, cancel As CancellationToken) As AsyncQueue(Of ProposalCollectionBase)

매개 변수

completionState
CompletionState
scenario
ProposalScenario
triggeringCharacter
Char
groupingDelay
TimeSpan

반환

AsyncQueue<T>ProposalCollectionBase입니다. Complete() 는 모든 ProposalSourceBase가 완료되면 큐에서 호출됩니다.

설명

제안을 큐에 추가하기 위한 알고리즘은 다음과 같습니다.

1. Call <xref data-throw-if-not-resolved="true" uid="Microsoft.VisualStudio.Language.Proposals.ProposalSourceBase.RequestProposalsAsync(Microsoft.VisualStudio.Text.VirtualSnapshotPoint,Microsoft.VisualStudio.Language.Proposals.CompletionState,Microsoft.VisualStudio.Language.Proposals.ProposalScenario,System.Char,System.Threading.CancellationToken)"></xref> for each source.
2. Wait until one source returns with a non-null/empty result.
3. Wait an additional <code data-dev-comment-type="paramref">groupingDelay</code> to allow other sources to generate results.
4. Enqueue all sources that generated results using the ordering specified by their <xref data-throw-if-not-resolved="true" uid="Microsoft.VisualStudio.Language.Proposals.ProposalSourceProviderBase"></xref>.
5. Enqueue remaining results in their order of completion.

적용 대상