Beispiel #1
0
        public void Invoke(InvokerArgs args = null)
        {
            foreach (Type command in CommandTypes)
            {
                Command c = (Command)Activator.CreateInstance(command);
                DIUtil.InjectProps(c);
                c.Execute(args);
            }

            Invoked(this, new InvokedEventArgs(args));
        }
Beispiel #2
0
        public virtual void Invoke(InvokerArgs args = null)
        {
            foreach (Type command in CommandTypes)
            {
                Command c = (Command)Activator.CreateInstance(command);
                DIUtil.InjectProps(c);

                if (c.Detained)
                {
                    c.Released += HandleCommandRelease;
                    detainedCommands.Add(c);
                }

                c.Execute(args);
            }

            Invoked(this, new InvokedEventArgs(args));
        }
Beispiel #3
0
 public void Start(Invoker invoker, InvokerArgs args = null)
 {
     ArgsMap.Clear();
     invoker.Invoke(args);
 }
Beispiel #4
0
 public abstract void Execute(InvokerArgs args);
Beispiel #5
0
 public InvokedEventArgs(InvokerArgs invokerArgs)
 {
     this.invokerArgs = invokerArgs;
 }
Beispiel #6
0
 public virtual void Execute(InvokerArgs args)
 {
 }