MergeContext.GetRootModelElements(Transaction) 方法

定义

返回作为构造 ElementGroup 中的根元素的 ModelElements (非 PresentationElements) 的集合。

public:
 static System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ GetRootModelElements(Microsoft::VisualStudio::Modeling::Transaction ^ transaction);
public static System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Modeling.ModelElement> GetRootModelElements (Microsoft.VisualStudio.Modeling.Transaction transaction);
static member GetRootModelElements : Microsoft.VisualStudio.Modeling.Transaction -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Modeling.ModelElement>
Public Shared Function GetRootModelElements (transaction As Transaction) As ReadOnlyCollection(Of ModelElement)

参数

transaction
Transaction

包含已保存的 Mergecontext.set 的事务。 这通常是顶级事务。

返回

ReadOnlyCollection<ModelElement>

ModelElements 的集合 (非 PresentationElements) ,用作重组 ElementGroup 中的根元素。

适用于