예제 #1
0
 private CommandReturnCodes ExecuteSingleCommand(CommandHostContext context)
 {
     return(context.CommandHost.RunCommand(_input, _output, context.Arguments.Tenant, context.Arguments.Arguments.ToArray(), context.Arguments.Switches));
 }
예제 #2
0
 private string ReadCommand(CommandHostContext context)
 {
     _output.WriteLine();
     _output.Write("orchard> ");
     return(_input.ReadLine());
 }
예제 #3
0
        private CommandReturnCodes RunCommandInSession(CommandHostContext context, string command)
        {
            var args = new OrchardParametersParser().Parse(new CommandParametersParser().Parse(new CommandLineParser().Parse(command)));

            return(context.CommandHost.RunCommand(_input, _output, args.Tenant, args.Arguments.ToArray(), args.Switches));
        }
예제 #4
0
        private CommandReturnCodes ExecuteResponseFiles(CommandHostContext context)
        {
            var responseLines = new ResponseFiles.ResponseFiles().ReadFiles(context.Arguments.ResponseFiles);

            return(context.CommandHost.RunCommands(_input, _output, context.Logger, responseLines.ToArray()));
        }
예제 #5
0
 private CommandReturnCodes ExecuteSingleCommand(CommandHostContext context)
 {
     return(context.CommandHost.RunCommand(_input, _output, context.Logger, context.Arguments));
 }
예제 #6
0
 private async Task <CommandReturnCodes> ExecuteSingleCommandAsync(CommandHostContext context)
 {
     return(await context.CommandHost.RunCommandAsync(_input, _output, context.Arguments.Tenant, context.Arguments.Arguments.ToArray(), context.Arguments.Switches));
 }
예제 #7
0
        private async Task <CommandReturnCodes> RunCommandInSessionAsync(CommandHostContext context, string command)
        {
            var args = new OrchardParametersParser().Parse(new CommandParametersParser().Parse(new CommandParser().Parse(command)));

            return(await context.CommandHost.RunCommandAsync(_input, _output, args.Tenant, args.Arguments.ToArray(), args.Switches));
        }
예제 #8
0
 private async Task <string> ReadCommandAsync(CommandHostContext context)
 {
     // REMOVE THIS LINE  await _output.WriteLineAsync();
     // REMOVE THIS LINE  await _output.WriteAsync("orchard> ");
     return(await _input.ReadLineAsync());
 }