private async Task <CompletionList> GetCompletionListAsync(ICompletionService completionService, CompletionTriggerInfo triggerInfo, CancellationToken cancellationToken)
 {
     if (_documentOpt == null && completionService is ITextCompletionService)
     {
         var textCompletionService = (ITextCompletionService)completionService;
         return(await textCompletionService.GetCompletionListAsync(_text, _subjectBufferCaretPosition, triggerInfo, _completionProviders, _options, cancellationToken).ConfigureAwait(false));
     }
     else if (_documentOpt != null)
     {
         return(await completionService.GetCompletionListAsync(_documentOpt, _subjectBufferCaretPosition, triggerInfo, _completionProviders, cancellationToken).ConfigureAwait(false));
     }
     else
     {
         return(null);
     }
 }
 private async Task<CompletionList> GetCompletionListAsync(ICompletionService completionService, CompletionTriggerInfo triggerInfo, CancellationToken cancellationToken)
 {
     return _documentOpt != null
         ? await completionService.GetCompletionListAsync(_documentOpt, _subjectBufferCaretPosition, triggerInfo, _options, _completionProviders, cancellationToken).ConfigureAwait(false)
         : null;
 }
Beispiel #3
0
 private async Task <CompletionList> GetCompletionListAsync(ICompletionService completionService, CompletionTriggerInfo triggerInfo, CancellationToken cancellationToken)
 {
     return(_documentOpt != null
         ? await completionService.GetCompletionListAsync(_documentOpt, _subjectBufferCaretPosition, triggerInfo, _options, _completionProviders, cancellationToken).ConfigureAwait(false)
         : null);
 }
 private async Task<CompletionList> GetCompletionListAsync(ICompletionService completionService, CompletionTriggerInfo triggerInfo, CancellationToken cancellationToken)
 {
     if (_documentOpt == null && completionService is ITextCompletionService)
     {
         var textCompletionService = (ITextCompletionService)completionService;
         return await textCompletionService.GetCompletionListAsync(_text, _subjectBufferCaretPosition, triggerInfo, _completionProviders, _options, cancellationToken).ConfigureAwait(false);
     }
     else if (_documentOpt != null)
     {
         return await completionService.GetCompletionListAsync(_documentOpt, _subjectBufferCaretPosition, triggerInfo, _completionProviders, cancellationToken).ConfigureAwait(false);
     }
     else
     {
         return null;
     }
 }