Class MenuDisplayItemModelExtensions
- Namespace
- Songhay.Extensions
- Assembly
- SonghayCore.dll
Extensions of MenuDisplayItemModel
public static class MenuDisplayItemModelExtensions
- Inheritance
-
MenuDisplayItemModelExtensions
- Inherited Members
Methods
DefaultOrFirst(IEnumerable<MenuDisplayItemModel>?)
Returns the Default Selection
IsDefaultSelection == true
or the First MenuDisplayItemModel.
public static MenuDisplayItemModel? DefaultOrFirst(this IEnumerable<MenuDisplayItemModel>? data)
Parameters
dataIEnumerable<MenuDisplayItemModel>The data.
Returns
GetAllBy(MenuDisplayItemModel?, Func<MenuDisplayItemModel, bool>)
Gets all MenuDisplayItemModel by the specified predicate.
public static IEnumerable<MenuDisplayItemModel> GetAllBy(this MenuDisplayItemModel? data, Func<MenuDisplayItemModel, bool> predicate)
Parameters
dataMenuDisplayItemModelpredicateFunc<MenuDisplayItemModel, bool>the predicate
Returns
HasGroupId(MenuDisplayItemModel?, string)
Returns true when the grouping has the specified identifier.
public static bool HasGroupId(this MenuDisplayItemModel? data, string groupId)
Parameters
dataMenuDisplayItemModelgroupIdstringthe GroupId
Returns
WithChildItem(MenuDisplayItemModel?, MenuDisplayItemModel?)
Fluently returns MenuDisplayItemModel with child item.
public static MenuDisplayItemModel? WithChildItem(this MenuDisplayItemModel? data, MenuDisplayItemModel? child)
Parameters
dataMenuDisplayItemModelThe data.
childMenuDisplayItemModelThe child.
Returns
WithChildItems(MenuDisplayItemModel?, IEnumerable<MenuDisplayItemModel>?)
Fluently returns MenuDisplayItemModel with child items.
public static MenuDisplayItemModel? WithChildItems(this MenuDisplayItemModel? data, IEnumerable<MenuDisplayItemModel>? items)
Parameters
dataMenuDisplayItemModelThe data.
itemsIEnumerable<MenuDisplayItemModel>The items.