public static void Eval(this IDiscretionaryAcl dacl, Type rightType, SecurityResults securityResults)
        {
            string rtn = rightType.GetFriendlyRightTypeName();
            IEnumerable <IAccessControlEntry> found = from ace in dacl
                                                      where ace.RightData.FriendlyTypeName.Equals(rtn)
                                                      select ace;
            List <IAccessControlEntry> aces = new List <IAccessControlEntry>(found);

            EvalAceList(rightType, aces, securityResults);
        }
 public static void CopyTo(this IDiscretionaryAcl dacl, IDiscretionaryAcl targetDacl, bool forceInheritance = false)
 {
     if (targetDacl.AllowInherit || forceInheritance)
     {
         foreach (IAccessControlEntry ace in dacl)
         {
             if (ace.Inheritable || forceInheritance)
             {
                 targetDacl.Add(ace.Clone());
             }
         }
     }
 }
        public static void Eval(this IDiscretionaryAcl dacl, SecurityResults securityResults)
        {
            Dictionary <Type, List <IAccessControlEntry> > aceLists = new Dictionary <Type, List <IAccessControlEntry> >();

            foreach (IAccessControlEntry ace in dacl)
            {
                if (!aceLists.ContainsKey(ace.RightData.RightType))
                {
                    aceLists[ace.RightData.RightType] = new List <IAccessControlEntry>();
                }

                aceLists[ace.RightData.RightType].Add(ace);
            }

            foreach (Type rightType in aceLists.Keys)
            {
                EvalAceList(rightType, aceLists[rightType], securityResults);
            }
        }
 public static void Eval <T>(this IDiscretionaryAcl dacl, SecurityResults securityResults) where T : struct, IConvertible
 {
     Eval(dacl, typeof(T), securityResults);
 }