Table of Contents

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

data IEnumerable<MenuDisplayItemModel>

The data.

Returns

MenuDisplayItemModel

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

data MenuDisplayItemModel

the MenuDisplayItemModel

predicate Func<MenuDisplayItemModel, bool>

the predicate

Returns

IEnumerable<MenuDisplayItemModel>

HasGroupId(MenuDisplayItemModel?, string)

Returns true when the grouping has the specified identifier.

public static bool HasGroupId(this MenuDisplayItemModel? data, string groupId)

Parameters

data MenuDisplayItemModel

the MenuDisplayItemModel

groupId string

the GroupId

Returns

bool

WithChildItem(MenuDisplayItemModel?, MenuDisplayItemModel?)

Fluently returns MenuDisplayItemModel with child item.

public static MenuDisplayItemModel? WithChildItem(this MenuDisplayItemModel? data, MenuDisplayItemModel? child)

Parameters

data MenuDisplayItemModel

The data.

child MenuDisplayItemModel

The child.

Returns

MenuDisplayItemModel

WithChildItems(MenuDisplayItemModel?, IEnumerable<MenuDisplayItemModel>?)

Fluently returns MenuDisplayItemModel with child items.

public static MenuDisplayItemModel? WithChildItems(this MenuDisplayItemModel? data, IEnumerable<MenuDisplayItemModel>? items)

Parameters

data MenuDisplayItemModel

The data.

items IEnumerable<MenuDisplayItemModel>

The items.

Returns

MenuDisplayItemModel