Inheritance: RepositoryEventArgs
Esempio n. 1
0
 private void RouteCancelEvent(RepositoryCancelEvent @event, object sender, Node contextNode, CancellableNodeEventArgs originalArgs)
 {
     var args = new RepositoryCancelEventArgs(contextNode);
     @event.FireEvent(sender, args);
     originalArgs.Cancel = args.Cancel;
     originalArgs.CancelMessage = args.CancelMessage;
 }
Esempio n. 2
0
        private void RouteCancelEvent(RepositoryCancelEvent @event, object sender, Node contextNode, CancellableNodeEventArgs originalArgs)
        {
            var args = new RepositoryCancelEventArgs(contextNode);

            @event.FireEvent(sender, args);
            originalArgs.Cancel        = args.Cancel;
            originalArgs.CancelMessage = args.CancelMessage;
        }
Esempio n. 3
0
        public void FireEvent(object sender, RepositoryCancelEventArgs args)
        {
            var eventHandlers = FindEventHandlerNodes(args.ContextNode);

            base.Fire <RepositoryCancelEventHandler, RepositoryCancelEventArgs>(eventHandlers, sender, args);
        }
Esempio n. 4
0
        public override void HandleEvent(object sender, RepositoryCancelEventArgs e)
        {
            if (RepositoryEventFired != null)
                RepositoryEventFired(this, new TestRepositoryEventArgs { ContextPath = e.ContextNode.Path });

            if (this.Name.EndsWith("AppEx"))
                throw new ApplicationException("AppEx");
            if (this.Name.EndsWith("NullRefEx"))
                throw new NullReferenceException("NullRefEx");
            if (this.Name.EndsWith("Ex"))
                throw new Exception("Ex");

            if (this.Name.EndsWith("Cancel"))
            {
                e.Cancel = true;
                e.CancelMessage = this.Name;
                return;
            }
            if (this.Name.EndsWith("Handled"))
            {
                e.Handled = true;
                return;
            }
        }
 public abstract void HandleEvent(object sender, RepositoryCancelEventArgs e);
Esempio n. 6
0
 public abstract void HandleEvent(object sender, RepositoryCancelEventArgs e);
Esempio n. 7
0
 private void InvokeEventHandler(RepositoryCancelEventHandler eventHandler, object sender, RepositoryCancelEventArgs args, out bool cancel)
 {
     eventHandler.HandleEvent(sender, args);
     cancel = args.Cancel;
 }
Esempio n. 8
0
 public void FireEvent(object sender, RepositoryCancelEventArgs args)
 {
     var eventHandlers = FindEventHandlerNodes(args.ContextNode);
     base.Fire<RepositoryCancelEventHandler, RepositoryCancelEventArgs>(eventHandlers, sender, args);
 }