共用方式為


Workspace.OnAnalyzerReferenceAdded(ProjectId, AnalyzerReference) 方法

定義

將分析器參考新增至主環境中的專案時,請呼叫此方法。

protected public:
 void OnAnalyzerReferenceAdded(Microsoft::CodeAnalysis::ProjectId ^ projectId, Microsoft::CodeAnalysis::Diagnostics::AnalyzerReference ^ analyzerReference);
protected internal void OnAnalyzerReferenceAdded (Microsoft.CodeAnalysis.ProjectId projectId, Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference analyzerReference);
member this.OnAnalyzerReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference -> unit
Protected Friend Sub OnAnalyzerReferenceAdded (projectId As ProjectId, analyzerReference As AnalyzerReference)

參數

projectId
ProjectId
analyzerReference
AnalyzerReference

適用於