Table of Contents

Method GetRoleType

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetRoleType(MenuItemRole?)

Maps a nullable MenuItemRole to its corresponding MenuItemRoleType value.

public static MenuItemRoleType GetRoleType(MenuItemRole? role)

Parameters

role MenuItemRole

The nullable MenuItemRole to map. If null, the method returns None.

Returns

MenuItemRoleType

A MenuItemRoleType value that corresponds to the specified role. If role is null, the method returns None. If the role does not match any predefined mapping, the method returns Other.