Example #1
0
 internal static void FireOnPermissionChanging(CancellableNodeEventHandler PermissionChanging, Node sender, CancellablePermissionChangingEventArgs e, List <Type> disabledObservers)
 {
     InvokeCancelEventHandlers(PermissionChanging, sender, e);
     FireNodeEvent(disabledObservers, observer => { observer.OnPermissionChanging(sender, e); });
 }
Example #2
0
 protected internal virtual void OnPermissionChanging(object sender, CancellablePermissionChangingEventArgs e)
 {
 }
Example #3
0
        internal static void FireOnPermissionChanging(CancellableNodeEventHandler PermissionChanging, Node sender, CancellablePermissionChangingEventArgs e, List <Type> disabledObservers)
        {
            InvokeCancelEventHandlers(PermissionChanging, sender, e);
            var observers = NodeTypeManager.Current.NodeObservers;

            if (observers == null)
            {
                return;
            }
            if (disabledObservers == null)
            {
                foreach (NodeObserver observer in observers)
                {
                    observer.OnPermissionChanging(sender, e);
                }
            }
            else
            {
                foreach (NodeObserver observer in observers)
                {
                    if (!disabledObservers.Contains(observer.GetType()))
                    {
                        observer.OnPermissionChanging(sender, e);
                    }
                }
            }
        }