Пример #1
0
        public static ResourceType GetResourceType(CommonObjectSecurity sec)
        {
            switch (sec.GetType().Name)
            {
            case "FileSecurity":
            case "DirectorySecurity":
            case "CryptoKeySecurity":
                return(ResourceType.FileObject);

            case "PipeSecurity":
            case "EventWaitHandleSecurity":
            case "MutexSecurity":
            case "MemoryMappedFileSecurity":
            case "SemaphoreSecurity":
                return(ResourceType.KernelObject);

            case "RegistrySecurity":
                return(ResourceType.RegistryKey);

            case "TaskSecurity":
                return(Community.Windows.Forms.AccessControlEditorDialog.TaskResourceType);
            }
            return(ResourceType.Unknown);
        }
Пример #2
0
        public static bool IsContainerObject(CommonObjectSecurity sec)
        {
            string secTypeName = sec.GetType().Name;

            return(!Array.Exists <string>(nonContainerTypes, delegate(string s) { return secTypeName == s; }));
        }
Пример #3
0
        public static bool IsContainerObject(CommonObjectSecurity sec)
        {
            var secTypeName = sec.GetType().Name;

            return(!Array.Exists(nonContainerTypes, s => secTypeName == s));
        }