CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, CancellationToken) |
傳回由所有 Analyzers 從分析指定 |
GetAnalyzerSemanticDiagnosticsAsync(SemanticModel, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken) |
從分析指定的 |
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
語意模型,表示要分析的語法樹狀結構。
- 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
語意模型,表示要分析的語法樹狀結構。
- analyzers
- ImmutableArray<DiagnosticAnalyzer>
需要診斷的分析器。 所有指定的分析器都必須來自傳遞至 建構函式的分析 CompilationWithAnalyzers 器。
- cancellationToken
- CancellationToken
取消權杖。