public bool BypassPermissions()
        {
            BypassPermissionsHandler handler = OnBypassPermissions;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                return(list.Cast <BypassPermissionsHandler>().All(h => h() != false));
            }
            return(true);
        }
Exemple #2
0
        public bool BypassPermissions()
        {
            BypassPermissionsHandler handler = OnBypassPermissions;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                foreach (BypassPermissionsHandler h in list)
                {
                    if (h() == false)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }