コード例 #1
0
 /// <summary>
 /// Gets the currently available jdwp process id's on the given device.
 /// </summary>
 public static IEnumerable <int> GetJdwpProcessIds(IDevice device, int timeout)
 {
     try
     {
         using (var socket = new AdbJdwpRequest(EndPoint))
         {
             return(socket.JdwpProcessIds(device));
         }
     }
     catch (Exception ex)
     {
         throw new AdbException(string.Format("Failed to list jdwp pid's because: {0}", ex.Message));
     }
 }
コード例 #2
0
ファイル: JdwpMonitor.cs プロジェクト: yuva2achieve/dot42
        /// <summary>
        /// Perform the monitor loop
        /// </summary>
        private void Run()
        {
            var initialLoopCounter = loopCounter;

            while (initialLoopCounter == loopCounter)
            {
                try
                {
                    if (errorCount > 0)
                    {
                        // Ensure Adb is started
                        new Adb().StartServer(Adb.Timeout.StartServer);
                        errorCount = 0;
                        Thread.Sleep(500);
                    }
                    else
                    {
                        // Start tracking
                        try
                        {
                            using (request = new AdbJdwpRequest(endPoint))
                            {
                                request.TrackJdwpProcessIds(device, CallBack);
                            }
                        }
                        finally
                        {
                            request = null;
                        }
                    }
                }
                catch
                {
                    errorCount++;
                }
            }
        }
コード例 #3
0
ファイル: Adb.cs プロジェクト: Xtremrules/dot42
 /// <summary>
 /// Gets the currently available jdwp process id's on the given device.
 /// </summary>
 public static IEnumerable<int> GetJdwpProcessIds(IDevice device, int timeout)
 {
     try
     {
         using (var socket = new AdbJdwpRequest(EndPoint))
         {
             return socket.JdwpProcessIds(device);
         }
     }
     catch (Exception ex)
     {
         throw new AdbException(string.Format("Failed to list jdwp pid's because: {0}", ex.Message));
     }
 }
コード例 #4
0
ファイル: JdwpMonitor.cs プロジェクト: Xtremrules/dot42
 /// <summary>
 /// Perform the monitor loop
 /// </summary>
 private void Run()
 {
     var initialLoopCounter = loopCounter;
     while (initialLoopCounter == loopCounter)
     {
         try
         {
             if (errorCount > 0)
             {
                 // Ensure Adb is started
                 new Adb().StartServer(Adb.Timeout.StartServer);
                 errorCount = 0;
                 Thread.Sleep(500);
             }
             else
             {
                 // Start tracking
                 try
                 {
                     using (request = new AdbJdwpRequest(endPoint))
                     {
                         request.TrackJdwpProcessIds(device, CallBack);
                     }
                 }
                 finally
                 {
                     request = null;
                 }
             }
         }
         catch
         {
             errorCount++;
         }
     }
 }