Exemplo n.º 1
0
        internal static async Task <Document> ReduceAsync(Document document, SyntaxAnnotation annotation, SimplifierOptions options, CancellationToken cancellationToken)
        {
            var root = await document.GetRequiredSyntaxRootAsync(cancellationToken).ConfigureAwait(false);

            return(await ReduceAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan), options, cancellationToken).ConfigureAwait(false));
        }
Exemplo n.º 2
0
#pragma warning restore

        internal static Task <Document> ReduceAsync(Document document, TextSpan span, SimplifierOptions options, CancellationToken cancellationToken)
        => ReduceAsync(document, SpecializedCollections.SingletonEnumerable(span), options, cancellationToken);
Exemplo n.º 3
0
        internal static async Task <Document> ReduceAsync(Document document, SimplifierOptions options, CancellationToken cancellationToken)
        {
            var root = await document.GetRequiredSyntaxRootAsync(cancellationToken).ConfigureAwait(false);

            return(await ReduceAsync(document, root.FullSpan, options, cancellationToken).ConfigureAwait(false));
        }