Exemplo n.º 1
0
        public override void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
        {
            if (IsClosed)
            {
                throw new ObjectDisposedException(nameof(PipeConnection));
            }

            if (runInShell)
            {
                AD7UnixAsyncShellCommand command = new AD7UnixAsyncShellCommand(CreateShellFromSettings(TransportSettings, OuterConnection), callback, closeShellOnComplete: true);
                command.Start(commandText);

                asyncCommand = command;
            }
            else
            {
                DockerExecSettings  settings = new DockerExecSettings(_containerName, commandText, true);
                AD7UnixAsyncCommand command  = new AD7UnixAsyncCommand(CreateShellFromSettings(settings, OuterConnection, true), callback, closeShellOnComplete: true);

                asyncCommand = command;
            }
        }
Exemplo n.º 2
0
 internal void BeginExecuteAsyncCommand(string commandText, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     var command = new AD7UnixAsyncCommand(new StreamingShell(_remoteSystem), callback);
     command.Start(commandText);
     asyncCommand = command;
 }