SuggestionManagerBase.TryDisplaySuggestionAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試向使用者顯示 suggestion
。
public abstract System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Suggestions.SuggestionSessionBase?> TryDisplaySuggestionAsync (Microsoft.VisualStudio.Language.Suggestions.SuggestionBase suggestion, System.Threading.CancellationToken cancel);
abstract member TryDisplaySuggestionAsync : Microsoft.VisualStudio.Language.Suggestions.SuggestionBase * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Suggestions.SuggestionSessionBase>
Public MustOverride Function TryDisplaySuggestionAsync (suggestion As SuggestionBase, cancel As CancellationToken) As Task(Of SuggestionSessionBase)
參數
- suggestion
- SuggestionBase
- cancel
- CancellationToken
傳回
SuggestionSessionBase如果可以顯示建議,則為 ,否則為 null。
備註
請注意,在呼叫 之前 DisplayProposalAsync(ProposalBase, CancellationToken) 不會顯示任何內容。