Simplifier.ReduceAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ReduceAsync(Document, OptionSet, CancellationToken) |
減少檔中已標注 Annotation 的所有子樹狀結構。 標注的節點和所有子節點將會減少。 |
ReduceAsync(Document, SyntaxAnnotation, OptionSet, CancellationToken) |
減少在以指定 |
ReduceAsync(Document, TextSpan, OptionSet, CancellationToken) |
減少在指定範圍中找到的批註 Annotation 子樹狀結構。 標注的節點和所有子節點將會減少。 |
ReduceAsync(Document, IEnumerable<TextSpan>, OptionSet, CancellationToken) |
減少在指定範圍中找到的批註 Annotation 子樹狀結構。 標注的節點和所有子節點將會減少。 |
ReduceAsync(Document, OptionSet, CancellationToken)
減少檔中已標注 Annotation 的所有子樹狀結構。 標注的節點和所有子節點將會減少。
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Options.OptionSet optionSet = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Options.OptionSet? optionSet = default, System.Threading.CancellationToken cancellationToken = default);
static member ReduceAsync : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function ReduceAsync (document As Document, Optional optionSet As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
參數
- document
- Document
- optionSet
- OptionSet
- cancellationToken
- CancellationToken
傳回
適用於
ReduceAsync(Document, SyntaxAnnotation, OptionSet, CancellationToken)
減少在以指定 annotation
識別的子樹內找到的子樹狀結構批註 Annotation 。
標注的節點和所有子節點將會減少。
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxAnnotation annotation, Microsoft.CodeAnalysis.Options.OptionSet optionSet = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxAnnotation annotation, Microsoft.CodeAnalysis.Options.OptionSet? optionSet = default, System.Threading.CancellationToken cancellationToken = default);
static member ReduceAsync : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.SyntaxAnnotation * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function ReduceAsync (document As Document, annotation As SyntaxAnnotation, Optional optionSet As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
參數
- document
- Document
- annotation
- SyntaxAnnotation
- optionSet
- OptionSet
- cancellationToken
- CancellationToken
傳回
適用於
ReduceAsync(Document, TextSpan, OptionSet, CancellationToken)
減少在指定範圍中找到的批註 Annotation 子樹狀結構。 標注的節點和所有子節點將會減少。
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, Microsoft.CodeAnalysis.Options.OptionSet optionSet = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, Microsoft.CodeAnalysis.Options.OptionSet? optionSet = default, System.Threading.CancellationToken cancellationToken = default);
static member ReduceAsync : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Text.TextSpan * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function ReduceAsync (document As Document, span As TextSpan, Optional optionSet As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
參數
- document
- Document
- span
- TextSpan
- optionSet
- OptionSet
- cancellationToken
- CancellationToken
傳回
適用於
ReduceAsync(Document, IEnumerable<TextSpan>, OptionSet, CancellationToken)
減少在指定範圍中找到的批註 Annotation 子樹狀結構。 標注的節點和所有子節點將會減少。
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Text.TextSpan> spans, Microsoft.CodeAnalysis.Options.OptionSet optionSet = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReduceAsync (Microsoft.CodeAnalysis.Document document, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Text.TextSpan> spans, Microsoft.CodeAnalysis.Options.OptionSet? optionSet = default, System.Threading.CancellationToken cancellationToken = default);
static member ReduceAsync : Microsoft.CodeAnalysis.Document * seq<Microsoft.CodeAnalysis.Text.TextSpan> * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function ReduceAsync (document As Document, spans As IEnumerable(Of TextSpan), Optional optionSet As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
參數
- document
- Document
- spans
- IEnumerable<TextSpan>
- optionSet
- OptionSet
- cancellationToken
- CancellationToken