共用方式為


Workspace.ApplyMetadataReferenceAdded(ProjectId, MetadataReference) 方法

定義

這個方法會在 期間 TryApplyChanges(Solution) 呼叫,以將中繼資料參考新增至專案。

覆寫此方法以實作新增中繼資料參考的功能。

protected:
 virtual void ApplyMetadataReferenceAdded(Microsoft::CodeAnalysis::ProjectId ^ projectId, Microsoft::CodeAnalysis::MetadataReference ^ metadataReference);
protected virtual void ApplyMetadataReferenceAdded (Microsoft.CodeAnalysis.ProjectId projectId, Microsoft.CodeAnalysis.MetadataReference metadataReference);
abstract member ApplyMetadataReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.MetadataReference -> unit
override this.ApplyMetadataReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.MetadataReference -> unit
Protected Overridable Sub ApplyMetadataReferenceAdded (projectId As ProjectId, metadataReference As MetadataReference)

參數

projectId
ProjectId
metadataReference
MetadataReference

適用於