예제 #1
0
        private static void AddEnumToDictionary(Dictionary <uint, string> access, Type enumType, uint valid_mask, bool sdk_names)
        {
            Regex re = new Regex("([A-Z])");

            foreach (uint mask in Enum.GetValues(enumType))
            {
                if (IsValidMask(mask, valid_mask))
                {
                    string name = sdk_names ? NtSecurity.GetSDKName(enumType, mask)
                        : re.Replace(Enum.GetName(enumType, mask), " $1").Trim();
                    access.Add(mask, name);
                }
            }
        }