Class TreeEntitySortingService
Provides functionality for sorting tree entities based on sorting models.
Inheritance
object
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class TreeEntitySortingService : ITreeEntitySortingService
Constructors
View SourceTreeEntitySortingService()
Declaration
public TreeEntitySortingService()
Methods
View SourceSortEntities<TTreeEntity>(IEnumerable<TTreeEntity>, IEnumerable<SortingModel>)
Sorts a collection of tree entities according to the specified sorting models.
Declaration
public IEnumerable<TTreeEntity> SortEntities<TTreeEntity>(IEnumerable<TTreeEntity> entities, IEnumerable<SortingModel> sortingModels) where TTreeEntity : ITreeEntity
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TTreeEntity> | entities | The collection of entities to sort. |
| IEnumerable<SortingModel> | sortingModels | The sorting models defining the desired sort order. |
Returns
| Type | Description |
|---|---|
| IEnumerable<TTreeEntity> | The sorted collection of entities. |
Type Parameters
| Name | Description |
|---|---|
| TTreeEntity | The type of tree entity being sorted. |