Пример #1
0
        public static Privileges Create(long roles)
        {
            var result = new Privileges();

            foreach (var pair in _rolesMapping)
            {
                if ((roles & (int)pair.Key) != 0)
                {
                    pair.Value(result);
                }
            }

            return(result);
        }