Exemple #1
0
        protected virtual CompositeCommand Compose(string title, params CommandBase <CommandContext>[] commands)
        {
            var args = new CommandCreatedEventArgs {
                Command = new CompositeCommand(title, commands.Where(c => c != null).ToArray())
            };

            if (CreatedCommand != null)
            {
                CreatedCommand.Invoke(this, args);
            }
            return(args.Command);
        }
Exemple #2
0
		protected virtual CompositeCommand Compose(string title, params CommandBase<CommandContext>[] commands)
        {
			var args = new CommandCreatedEventArgs { Command = new CompositeCommand(title, commands) };
			if (CreatedCommand != null)
				CreatedCommand.Invoke(this, args);
			return args.Command;
        }