コード例 #1
0
        public int AddPort(IDebugPortRequest2 pRequest, out IDebugPort2 ppPort)
        {
            ppPort = null;

            string name;
            pRequest.GetPortName(out name);

            Match m = _portNameRegex.Match(name);
            if (!m.Success) {
                return Marshal.GetHRForException(new FormatException());
            }

            string secret = m.Groups["secret"].Value;
            string hostName = m.Groups["hostName"].Value;

            ushort portNum = _defaultPort;
            if (m.Groups["portNum"].Success) {
                if (!ushort.TryParse(m.Groups["portNum"].Value, out portNum)) {
                    return Marshal.GetHRForException(new FormatException());
                }
            }

            var port = new JRemoteDebugPort(this, hostName, portNum, secret, _useSsl);
            ppPort = port;
            return 0;
        }
コード例 #2
0
ファイル: JRemoteDebugProcess.cs プロジェクト: borota/JTVS
 public JRemoteDebugProcess(JRemoteDebugPort port, int pid, string exe, string username, string version)
 {
     this._port = port;
     this._pid = (pid == 0) ? 1 : pid; // attach dialog won't show processes with pid==0
     this._username = username;
     this._exe = string.IsNullOrEmpty(exe) ? "<python>" : exe;
     this._version = version;
 }