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); }
public static bool IsContainerObject(CommonObjectSecurity sec) { string secTypeName = sec.GetType().Name; return(!Array.Exists <string>(nonContainerTypes, delegate(string s) { return secTypeName == s; })); }
public static bool IsContainerObject(CommonObjectSecurity sec) { var secTypeName = sec.GetType().Name; return(!Array.Exists(nonContainerTypes, s => secTypeName == s)); }