Пример #1
0
        /// <summary>
        /// Execute asynchronously with the command line arguments. Useful for testing Oakton applications
        /// </summary>
        /// <param name="commandLine"></param>
        /// <returns></returns>
        public Task <int> ExecuteAsync(string commandLine)
        {
            commandLine = applyOptions(commandLine);
            var run = _factory.BuildRun(commandLine);

            return(execute(run));
        }
Пример #2
0
        /// <summary>
        /// Execute with the command line arguments. Useful for testing Oakton applications
        /// </summary>
        /// <param name="commandLine"></param>
        /// <returns></returns>
        public int Execute(string commandLine)
        {
            commandLine = applyOptions(commandLine);

            return(execute(() =>
            {
                var run = _factory.BuildRun(commandLine);
                return run.Execute();
            }));
        }
Пример #3
0
        public bool Execute(string commandLine)
        {
            var run = _factory.BuildRun(commandLine);

            return(run.Execute());
        }