예제 #1
0
 void IDebugUnixShellPort.BeginExecuteAsyncCommand(string commandText, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     GetConnection(ConnectionReason.Deferred).BeginExecuteAsyncCommand(commandText, callback, out asyncCommand);
 }
예제 #2
0
        public override void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
        {
            if (IsClosed)
            {
                throw new ObjectDisposedException(nameof(PipeConnection));
            }

            // Assume in the Begin Async that we are expecting raw output from the process
            var commandRunner = GetExecCommandRunner(commandText, handleRawOutput: true);

            asyncCommand = new DockerAsyncCommand(commandRunner, callback);
        }
예제 #3
0
 public abstract void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand);
예제 #4
0
 internal void BeginExecuteAsyncCommand(string commandText, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     var command = new AD7UnixAsyncCommand(new StreamingShell(_remoteSystem), callback);
     command.Start(commandText);
     asyncCommand = command;
 }
예제 #5
0
 internal void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     if (runInShell)
     {
         var command = new AD7UnixAsyncShellCommand(new StreamingShell(_remoteSystem), callback);
         command.Start(commandText);
         asyncCommand = command;
     }
     else
     {
         var command = new AD7UnixAsyncCommand(_remoteSystem, callback);
         command.Start(commandText);
         asyncCommand = command;
     }
 }
예제 #6
0
 public override void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     if (runInShell)
     {
         var command = new AD7UnixAsyncShellCommand(new SSHRemoteShell(_remoteSystem), callback, true);
         command.Start(commandText);
         asyncCommand = command;
     }
     else
     {
         var command = new SSHUnixAsyncCommand(_remoteSystem, callback);
         command.Start(commandText);
         asyncCommand = command;
     }
 }
예제 #7
0
        internal void BeginExecuteAsyncCommand(string commandText, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
        {
            var command = new AD7UnixAsyncCommand(_remoteSystem.Shell.OpenStream(), callback);

            command.Start(commandText);
            asyncCommand = command;
        }
예제 #8
0
 void IDebugUnixShellPort.BeginExecuteAsyncCommand(string commandText, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     GetConnection(ConnectionReason.Deferred).BeginExecuteAsyncCommand(commandText, callback, out asyncCommand);
 }
예제 #9
0
파일: AD7Port.cs 프로젝트: optikos/MIEngine
 void IDebugUnixShellPort.BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
 {
     GetConnection().BeginExecuteAsyncCommand(commandText, runInShell, callback, out asyncCommand);
 }
예제 #10
0
        /// <inheritdoc/>
        public override void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
        {
            if (IsClosed)
            {
                throw new ObjectDisposedException(nameof(PipeConnection));
            }

            var commandRunner = GetExecCommandRunner(commandText, handleRawOutput: runInShell == false);

            asyncCommand = new PipeAsyncCommand(commandRunner, callback);
        }
예제 #11
0
        /// <inheritdoc/>
        public override void BeginExecuteAsyncCommand(string commandText, bool runInShell, IDebugUnixShellCommandCallback callback, out IDebugUnixShellAsyncCommand asyncCommand)
        {
            if (IsClosed)
            {
                throw new ObjectDisposedException(nameof(WSLConnection));
            }

            string         args          = WSLCommandLine.GetExecCommandLineArgs(this.Name, commandText);
            ICommandRunner commandRunner = LocalCommandRunner.CreateInstance(handleRawOutput: runInShell == false, WSLCommandLine.ExePath, args);

            asyncCommand = new PipeAsyncCommand(commandRunner, callback);
        }
예제 #12
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;
            }
        }