Exemplo n.º 1
0
        internal void Add(Privilege flag)
        {
            set.Add(flag);
            _PrivLevel lvl;

            if (privMap.TryGetValue(highestPriv, out lvl) && privMap[flag] > lvl)
            {
                highestPriv    = flag;
                highestPrivLvl = lvl;
            }
        }
Exemplo n.º 2
0
 private void FindHighest()
 {
     highestPrivLvl = _PrivLevel.Regular;
     foreach (Privilege priv in set)
     {
         _PrivLevel lvl = privMap[priv];
         if (lvl > highestPrivLvl)
         {
             highestPrivLvl = lvl;
         }
     }
     highestPriv = (Privilege)Enum.Parse(typeof(Privilege), highestPrivLvl.ToString());
     //highestPriv = (Privilege)highestPrivLvl;
 }
Exemplo n.º 3
0
 private void FindHighest()
 {
     highestPrivLvl = _PrivLevel.Regular;
     foreach (Privilege priv in set)
     {
         _PrivLevel lvl = privMap[priv];
         if (lvl > highestPrivLvl)
         {
             highestPrivLvl = lvl;
         }
     }
     highestPriv = (Privilege) Enum.Parse(typeof (Privilege), highestPrivLvl.ToString());
     //highestPriv = (Privilege)highestPrivLvl;
 }
Exemplo n.º 4
0
 internal void Add(Privilege flag)
 {
     set.Add(flag);
     _PrivLevel lvl;
     if (privMap.TryGetValue(highestPriv, out lvl) && privMap[flag] > lvl)
     {
         highestPriv = flag;
         highestPrivLvl = lvl;
     }
 }