HierarchyConverter..::..ToHierarchicalModelList<(Of <(<'T>)>)> Method
Wraps each model in the collection with a [HierarchyData{T}]
adapter and returns them as a [HierarchicalModelList] that implements
[IHierarchicalEnumerable]. The resulting list can be used directly
as the data source for WebForms tree-bound controls, or is used internally by
[HierarchicalModelDataSource{T}.GetHierarchicalView] and
[HierarchyData{T}.GetChildren].
Namespace:
AdvantageCSP.HierarchicalModelDataSourceAssembly: AdvantageCMS.Core (in AdvantageCMS.Core.dll)
Syntax
public static HierarchicalModelList ToHierarchicalModelList<T>( this IEnumerable<T> modelWithHierarchy ) where T : IModelWithHierarchy<T>
Type Parameters
- T
- A model type implementing [IModelWithHierarchy{T}] (e.g., a Navigation node with Parent/Children references already populated).
Parameters
- modelWithHierarchy
- Type: IEnumerable<(Of <(<'T>)>)>
The collection of hierarchy-aware models to convert. Each model's [IModelWithHierarchy{T}.Children] and [IModelWithHierarchy{T}.Parent] should already be populated before calling this method.

