IAuthorityLevels
Interface for managing user authority levels and their names.
Namespace: ControlBee.Interfaces
Properties
| Name | Type | Description |
|---|---|---|
LevelMap | IReadOnlyDictionary<int, string> | A read-only dictionary mapping authority level numbers to their names. |
Methods
GetLevelName
Gets the name of an authority level by its numeric value.
string GetLevelName(int level);
Parameters:
level— The numeric authority level.
Returns: The name of the authority level.
Usage Example
IAuthorityLevels authorityLevels = ...;
// Get level name
string levelName = authorityLevels.GetLevelName(3);
// Access all levels
foreach (var kvp in authorityLevels.LevelMap)
{
Console.WriteLine($"Level {kvp.Key}: {kvp.Value}");
}