CompilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync 方法

定义

重载

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, CancellationToken)

返回所有Analyzers分析给定 tree时生成的语法诊断。 根据分析器的行为,返回诊断可能具有树外部的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

返回给定诊断分析给定 tree时生成的analyzers语法。 根据分析器的行为,返回诊断可能具有树外部的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

返回所有Analyzers分析给定 tree的 生成的语法诊断,可以选择将 范围限定为 filterSpan。 根据分析器的行为,返回诊断可能具有树或筛选器范围之外的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

返回通过分析给定 analyzerstree的 生成的语法诊断,可以选择将 范围限定为 filterSpan。 根据分析器的行为,返回诊断可能具有树或筛选器范围之外的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

返回所有Analyzers分析给定 tree时生成的语法诊断。 根据分析器的行为,返回诊断可能具有树外部的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

public:
 System::Threading::Tasks::Task<System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ GetAnalyzerSyntaxDiagnosticsAsync(Microsoft::CodeAnalysis::SyntaxTree ^ tree, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

参数

tree
SyntaxTree

要分析的语法树。

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

返回给定诊断分析给定 tree时生成的analyzers语法。 根据分析器的行为,返回诊断可能具有树外部的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

public:
 System::Threading::Tasks::Task<System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ GetAnalyzerSyntaxDiagnosticsAsync(Microsoft::CodeAnalysis::SyntaxTree ^ tree, System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostics::DiagnosticAnalyzer ^> analyzers, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

参数

tree
SyntaxTree

要分析的语法树。

analyzers
ImmutableArray<DiagnosticAnalyzer>

需要其诊断的分析器。 所有给定的分析器都必须来自传递到 的构造函数的分析 CompilationWithAnalyzers器。

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

返回所有Analyzers分析给定 tree的 生成的语法诊断,可以选择将 范围限定为 filterSpan。 根据分析器的行为,返回诊断可能具有树或筛选器范围之外的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

参数

tree
SyntaxTree

要分析的语法树。

filterSpan
Nullable<TextSpan>

用于在树中分析的可选筛选器范围。

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs
Source:
CompilationWithAnalyzers.cs

返回通过分析给定 analyzerstree的 生成的语法诊断,可以选择将 范围限定为 filterSpan。 根据分析器的行为,返回诊断可能具有树或筛选器范围之外的位置,并且可能不存在通过分析完整编译为树报告的一些诊断。

public System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync (Microsoft.CodeAnalysis.SyntaxTree tree, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSyntaxDiagnosticsAsync : Microsoft.CodeAnalysis.SyntaxTree * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic>>
Public Function GetAnalyzerSyntaxDiagnosticsAsync (tree As SyntaxTree, filterSpan As Nullable(Of TextSpan), analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

参数

tree
SyntaxTree

要分析的语法树。

filterSpan
Nullable<TextSpan>

用于在树中分析的可选筛选器范围。

analyzers
ImmutableArray<DiagnosticAnalyzer>

需要其诊断的分析器。 所有给定的分析器都必须来自传递到 的构造函数的分析 CompilationWithAnalyzers器。

cancellationToken
CancellationToken

取消标记。

返回

适用于