Method GetRoleType
GetRoleType(MenuItemRole?)
Maps a nullable MenuItemRole to its corresponding MenuItemRoleType value.
public static MenuItemRoleType GetRoleType(MenuItemRole? role)
Parameters
roleMenuItemRoleThe nullable MenuItemRole to map. If null, the method returns None.
Returns
- MenuItemRoleType
A MenuItemRoleType value that corresponds to the specified
role. Ifroleis null, the method returns None. If theroledoes not match any predefined mapping, the method returns Other.