Workspace.ApplyAnalyzerReferenceAdded(ProjectId, AnalyzerReference) 方法

定义

在向项目添加分析器引用的过程中 TryApplyChanges(Solution) 调用此方法。

重写此方法以实现添加分析器引用的功能。

protected:
 virtual void ApplyAnalyzerReferenceAdded(Microsoft::CodeAnalysis::ProjectId ^ projectId, Microsoft::CodeAnalysis::Diagnostics::AnalyzerReference ^ analyzerReference);
protected virtual void ApplyAnalyzerReferenceAdded (Microsoft.CodeAnalysis.ProjectId projectId, Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference analyzerReference);
abstract member ApplyAnalyzerReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference -> unit
override this.ApplyAnalyzerReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference -> unit
Protected Overridable Sub ApplyAnalyzerReferenceAdded (projectId As ProjectId, analyzerReference As AnalyzerReference)

参数

projectId
ProjectId
analyzerReference
AnalyzerReference

适用于