共用方式為


CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync 方法

定義

多載

GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, CancellationToken)

傳回由所有 Analyzers 從分析指定 model 之 所產生的語意診斷,選擇性地限定為 filterSpan 。 視分析器的行為而定,透過分析完整編譯來報告樹狀結構的一些診斷可能不存在。

GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

從分析指定的 model ,選擇性地將 範圍 filterSpan 設定為 ,傳回指定 analyzers 所產生的語意診斷。 視分析器的行為而定,透過分析完整編譯來報告樹狀結構的一些診斷可能不存在。

GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, 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 從分析指定 model 之 所產生的語意診斷,選擇性地限定為 filterSpan 。 視分析器的行為而定,透過分析完整編譯來報告樹狀結構的一些診斷可能不存在。

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

參數

model
SemanticModel

語意模型,表示要分析的語法樹狀結構。

filterSpan
Nullable<TextSpan>

樹狀結構中要範圍分析的選擇性範圍。

cancellationToken
CancellationToken

取消權杖。

傳回

適用於

GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, 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

從分析指定的 model ,選擇性地將 範圍 filterSpan 設定為 ,傳回指定 analyzers 所產生的語意診斷。 視分析器的行為而定,透過分析完整編譯來報告樹狀結構的一些診斷可能不存在。

public:
 System::Threading::Tasks::Task<System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::Diagnostic ^>> ^ GetAnalyzerSemanticDiagnosticsAsync(Microsoft::CodeAnalysis::SemanticModel ^ model, Nullable<Microsoft::CodeAnalysis::Text::TextSpan> filterSpan, 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>> GetAnalyzerSemanticDiagnosticsAsync (Microsoft.CodeAnalysis.SemanticModel model, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalyzerSemanticDiagnosticsAsync : Microsoft.CodeAnalysis.SemanticModel * 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 GetAnalyzerSemanticDiagnosticsAsync (model As SemanticModel, filterSpan As Nullable(Of TextSpan), analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Diagnostic))

參數

model
SemanticModel

語意模型,表示要分析的語法樹狀結構。

filterSpan
Nullable<TextSpan>

樹狀結構中要範圍分析的選擇性範圍。

analyzers
ImmutableArray<DiagnosticAnalyzer>

需要診斷的分析器。 所有指定的分析器都必須來自傳遞至 建構函式的分析 CompilationWithAnalyzers 器。

cancellationToken
CancellationToken

取消權杖。

傳回

適用於