ModelingPartitionMapper(Func<ModelElement>) 构造函数

定义

构造新的 ModelingPartitionMapper

protected public:
 ModelingPartitionMapper(Func<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ getRootElement);
protected internal ModelingPartitionMapper (Func<Microsoft.VisualStudio.Modeling.ModelElement> getRootElement);
new Microsoft.VisualStudio.Modeling.Shell.ModelingPartitionMapper : Func<Microsoft.VisualStudio.Modeling.ModelElement> -> Microsoft.VisualStudio.Modeling.Shell.ModelingPartitionMapper
Protected Friend Sub New (getRootElement As Func(Of ModelElement))

参数

getRootElement
Func<ModelElement>

函数,在计算后,返回模型的根元素

注解

不需要在 ModelingDocData 上创建依赖项,因为这会导致单元测试 (因为这会在 VS 托管) 上创建依赖项,所以,我们使用回调函数访问与主机 ModelingDocData 关联的当前根元素。

适用于