Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public static bool IsContainerObject(CommonObjectSecurity sec)
        {
            string secTypeName = sec.GetType().Name;

            return(!Array.Exists <string>(nonContainerTypes, delegate(string s) { return secTypeName == s; }));
        }
Exemplo n.º 3
0
        public static bool IsContainerObject(CommonObjectSecurity sec)
        {
            var secTypeName = sec.GetType().Name;

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