共用方式為


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)

傳回從分析指定 之 所產生的 analyzers 語法診斷,選擇性地限定為 filterSpantree 根據分析器的行為,傳回的診斷可以在樹狀結構或篩選範圍之外有位置,而透過完整編譯的分析報告樹狀結構的某些診斷可能不存在。

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

傳回所有 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

傳回從分析指定的 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

傳回所有 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

傳回從分析指定 之 所產生的 analyzers 語法診斷,選擇性地限定為 filterSpantree 根據分析器的行為,傳回的診斷可以在樹狀結構或篩選範圍之外有位置,而透過完整編譯的分析報告樹狀結構的某些診斷可能不存在。

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

取消權杖。

傳回

適用於