public async Task <Microsoft.CodeAnalysis.Editor.BraceMatchingResult?> FindBracesAsync(Document document, int position, CancellationToken cancellationToken = default) { var result = await _braceMatcher.FindBracesAsync(document, position, cancellationToken).ConfigureAwait(false); if (result.HasValue) { return(new Microsoft.CodeAnalysis.Editor.BraceMatchingResult(result.Value.LeftSpan, result.Value.RightSpan)); } else { return(null); } }
public async Task <BraceMatchingResult?> FindBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken) { var result = await _braceMatcher.FindBracesAsync(document, position, cancellationToken).ConfigureAwait(false); return(result.HasValue ? new BraceMatchingResult(result.Value.LeftSpan, result.Value.RightSpan) : null); }