public async Task <bool> TryAppendDiagnosticsForSpanAsync(Document document, TextSpan range, List <DiagnosticData> result, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) { var blockForData = false; var getter = await LatestDiagnosticsForSpanGetter.CreateAsync(this, document, range, blockForData, includeSuppressedDiagnostics, diagnosticIdOpt : null, cancellationToken).ConfigureAwait(false); return(await getter.TryGetAsync(result, cancellationToken).ConfigureAwait(false)); }
public async Task <bool> TryAppendDiagnosticsForSpanAsync( Document document, TextSpan range, ArrayBuilder <DiagnosticData> result, string?diagnosticId, bool includeSuppressedDiagnostics, bool blockForData, Func <string, IDisposable?>?addOperationScope, CancellationToken cancellationToken ) { var getter = await LatestDiagnosticsForSpanGetter .CreateAsync( this, document, range, blockForData, addOperationScope, includeSuppressedDiagnostics, diagnosticId, cancellationToken ) .ConfigureAwait(false); return(await getter.TryGetAsync(result, cancellationToken).ConfigureAwait(false)); }
public override async Task <bool> TryAppendDiagnosticsForSpanAsync(Document document, TextSpan range, List <DiagnosticData> diagnostics, CancellationToken cancellationToken) { var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); var getter = new LatestDiagnosticsForSpanGetter(this, document, root, range, blockForData: false, diagnostics: diagnostics, cancellationToken: cancellationToken); return(await getter.TryGetAsync().ConfigureAwait(false)); }
public async Task <bool> TryAppendDiagnosticsForSpanAsync( Document document, TextSpan?range, ArrayBuilder <DiagnosticData> result, Func <string, bool>?shouldIncludeDiagnostic, bool includeSuppressedDiagnostics, bool includeCompilerDiagnostics, CodeActionRequestPriority priority, bool blockForData, Func <string, IDisposable?>?addOperationScope, CancellationToken cancellationToken) { var getter = await LatestDiagnosticsForSpanGetter.CreateAsync( this, document, range, blockForData, addOperationScope, includeSuppressedDiagnostics, includeCompilerDiagnostics, priority, shouldIncludeDiagnostic, cancellationToken).ConfigureAwait(false); return(await getter.TryGetAsync(result, cancellationToken).ConfigureAwait(false)); }
public override async Task <IEnumerable <DiagnosticData> > GetDiagnosticsForSpanAsync(Document document, TextSpan range, CancellationToken cancellationToken) { var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); var getter = new LatestDiagnosticsForSpanGetter(this, document, root, range, blockForData: true, cancellationToken: cancellationToken); var result = await getter.TryGetAsync().ConfigureAwait(false); Contract.Requires(result); return(getter.Diagnostics); }
public async Task <IEnumerable <DiagnosticData> > GetDiagnosticsForSpanAsync(Document document, TextSpan range, bool includeSuppressedDiagnostics = false, string diagnosticIdOpt = null, CancellationToken cancellationToken = default) { var blockForData = true; var getter = await LatestDiagnosticsForSpanGetter.CreateAsync(this, document, range, blockForData, includeSuppressedDiagnostics, diagnosticIdOpt, cancellationToken).ConfigureAwait(false); var list = new List <DiagnosticData>(); var result = await getter.TryGetAsync(list, cancellationToken).ConfigureAwait(false); Debug.Assert(result); return(list); }
public override async Task <IEnumerable <DiagnosticData> > GetDiagnosticsForSpanAsync(Document document, TextSpan range, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) { var blockForData = true; var getter = await LatestDiagnosticsForSpanGetter.CreateAsync(this, document, range, blockForData, includeSuppressedDiagnostics, cancellationToken).ConfigureAwait(false); var list = new List <DiagnosticData>(); var result = await getter.TryGetAsync(list, cancellationToken).ConfigureAwait(false); Contract.Requires(result); return(list); }
public override async Task<IEnumerable<DiagnosticData>> GetDiagnosticsForSpanAsync(Document document, TextSpan range, CancellationToken cancellationToken) { var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); var getter = new LatestDiagnosticsForSpanGetter(this, document, root, range, blockForData: true, cancellationToken: cancellationToken); var result = await getter.TryGetAsync().ConfigureAwait(false); Contract.Requires(result); return getter.Diagnostics; }
public override async Task<bool> TryAppendDiagnosticsForSpanAsync(Document document, TextSpan range, List<DiagnosticData> diagnostics, CancellationToken cancellationToken) { var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); var getter = new LatestDiagnosticsForSpanGetter(this, document, root, range, blockForData: false, diagnostics: diagnostics, cancellationToken: cancellationToken); return await getter.TryGetAsync().ConfigureAwait(false); }