CompilationWithAnalyzers.GetAnalysisResultAsync 方法

定义

重载

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

返回一个 AnalysisResult ,它填充了 SyntaxDiagnostics 由给定 analyzers 分析给定 tree生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

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

返回一个 AnalysisResult ,它填充了 SemanticDiagnostics 由给定 analyzers 分析给定 model的 生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

返回一个 AnalysisResult ,它填充了 AdditionalFileDiagnostics 由 给定 analyzers 分析给定附加 file生成的 ,可以选择范围限定为 filterSpan。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

GetAnalysisResultAsync(SyntaxTree, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

返回一个 AnalysisResult ,它填充SyntaxDiagnostics了通过分析给定 tree的 给定 analyzers 生成的 。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

GetAnalysisResultAsync(SemanticModel, Nullable<TextSpan>, CancellationToken)

返回一个 AnalysisResult ,其中填充了 SemanticDiagnostics 由所有 Analyzers 通过分析给定 model的 生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

GetAnalysisResultAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

返回一个 AnalysisResult ,其中填充了 SyntaxDiagnostics 由所有 Analyzers 通过分析给定 tree的 生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

GetAnalysisResultAsync(AdditionalText, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

返回一个 AnalysisResult ,它填充了 AdditionalFileDiagnostics 由给定 analyzers 分析给定的附加 file生成的 。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

GetAnalysisResultAsync(ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

执行给定analyzers的 ,并返回与所有诊断和遥测信息对应的 AnalysisResult

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, CancellationToken)

返回一个 AnalysisResult ,其中填充了 AdditionalFileDiagnostics 由所有 Analyzers 通过分析给定的 附加 file生成的 ,可以选择范围限定为 filterSpan。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

GetAnalysisResultAsync(SyntaxTree, CancellationToken)

返回一个 AnalysisResult ,它填充了 SyntaxDiagnostics 所有 Analyzers 通过分析给定 tree的 生成的 。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

GetAnalysisResultAsync(AdditionalText, CancellationToken)

返回一个 AnalysisResult ,其中 AdditionalFileDiagnostics 填充了由所有 Analyzers 通过分析给定的附加 file生成的 。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

GetAnalysisResultAsync(CancellationToken)

执行所有 Analyzers ,并返回与所有诊断和遥测信息对应的 AnalysisResult

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

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

返回一个 AnalysisResult ,它填充了 SyntaxDiagnostics 由给定 analyzers 分析给定 tree生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

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

参数

tree
SyntaxTree

要分析的语法树。

filterSpan
Nullable<TextSpan>

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

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(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

返回一个 AnalysisResult ,它填充了 SemanticDiagnostics 由给定 analyzers 分析给定 model的 生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

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

参数

model
SemanticModel

表示要分析的语法树的语义模型。

filterSpan
Nullable<TextSpan>

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

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, ImmutableArray<DiagnosticAnalyzer>, CancellationToken)

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

返回一个 AnalysisResult ,它填充了 AdditionalFileDiagnostics 由 给定 analyzers 分析给定附加 file生成的 ,可以选择范围限定为 filterSpan。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

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

参数

file
AdditionalText

要分析的其他文件。

filterSpan
Nullable<TextSpan>

在 中 file分析的可选筛选器范围。

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(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

返回一个 AnalysisResult ,它填充SyntaxDiagnostics了通过分析给定 tree的 给定 analyzers 生成的 。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

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

参数

tree
SyntaxTree

要分析的语法树。

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(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

返回一个 AnalysisResult ,其中填充了 SemanticDiagnostics 由所有 Analyzers 通过分析给定 model的 生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SemanticModel model, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SemanticModel * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (model As SemanticModel, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

参数

model
SemanticModel

表示要分析的语法树的语义模型。

filterSpan
Nullable<TextSpan>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(SyntaxTree, Nullable<TextSpan>, CancellationToken)

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

返回一个 AnalysisResult ,其中填充了 SyntaxDiagnostics 由所有 Analyzers 通过分析给定 tree的 生成的 ,可以选择范围限定为 filterSpan。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

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

参数

tree
SyntaxTree

要分析的语法树。

filterSpan
Nullable<TextSpan>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(AdditionalText, 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

返回一个 AnalysisResult ,它填充了 AdditionalFileDiagnostics 由给定 analyzers 分析给定的附加 file生成的 。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.AdditionalText file, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.AdditionalText * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (file As AdditionalText, analyzers As ImmutableArray(Of DiagnosticAnalyzer), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

参数

file
AdditionalText

要分析的其他文件。

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(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

执行给定analyzers的 ,并返回与所有诊断和遥测信息对应的 AnalysisResult

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

参数

analyzers
ImmutableArray<DiagnosticAnalyzer>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(AdditionalText, Nullable<TextSpan>, CancellationToken)

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

返回一个 AnalysisResult ,其中填充了 AdditionalFileDiagnostics 由所有 Analyzers 通过分析给定的 附加 file生成的 ,可以选择范围限定为 filterSpan。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.AdditionalText file, Microsoft.CodeAnalysis.Text.TextSpan? filterSpan, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.AdditionalText * Nullable<Microsoft.CodeAnalysis.Text.TextSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (file As AdditionalText, filterSpan As Nullable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AnalysisResult)

参数

file
AdditionalText

要分析的其他文件。

filterSpan
Nullable<TextSpan>

在 中 file分析的可选筛选器范围。

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(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

返回一个 AnalysisResult ,它填充了 SyntaxDiagnostics 所有 Analyzers 通过分析给定 tree的 生成的 。 根据分析器的行为,可能不存在通过分析整个编译为树报告的一些诊断。

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.SyntaxTree tree, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.SyntaxTree * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (tree As SyntaxTree, cancellationToken As CancellationToken) As Task(Of AnalysisResult)

参数

tree
SyntaxTree

要分析的语法树。

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(AdditionalText, 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

返回一个 AnalysisResult ,其中 AdditionalFileDiagnostics 填充了由所有 Analyzers 通过分析给定的附加 file生成的 。 对于此 CompilationWithAnalyzers 实例,给定file的 必须是 的AdditionalFilesAnalysisOptions一部分。 根据分析器的行为,可能不存在通过分析完整编译为文件报告的一些诊断。

public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (Microsoft.CodeAnalysis.AdditionalText file, System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : Microsoft.CodeAnalysis.AdditionalText * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (file As AdditionalText, cancellationToken As CancellationToken) As Task(Of AnalysisResult)

参数

file
AdditionalText

要分析的其他文件。

cancellationToken
CancellationToken

取消标记。

返回

适用于

GetAnalysisResultAsync(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 ,并返回与所有诊断和遥测信息对应的 AnalysisResult

public:
 System::Threading::Tasks::Task<Microsoft::CodeAnalysis::Diagnostics::AnalysisResult ^> ^ GetAnalysisResultAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult> GetAnalysisResultAsync (System.Threading.CancellationToken cancellationToken);
member this.GetAnalysisResultAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Diagnostics.AnalysisResult>
Public Function GetAnalysisResultAsync (cancellationToken As CancellationToken) As Task(Of AnalysisResult)

参数

cancellationToken
CancellationToken

返回

适用于