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

适用于