示例#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));
        }
示例#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));
        }
示例#3
0
 public void Start(Invoker invoker, InvokerArgs args = null)
 {
     ArgsMap.Clear();
     invoker.Invoke(args);
 }
示例#4
0
 public abstract void Execute(InvokerArgs args);
示例#5
0
 public InvokedEventArgs(InvokerArgs invokerArgs)
 {
     this.invokerArgs = invokerArgs;
 }
示例#6
0
 public virtual void Execute(InvokerArgs args)
 {
 }