Číst v angličtině

Sdílet prostřednictvím


Thread2.SuspendCount – vlastnost

Kolikrát byla pozastavena podprocesu ladicím programem získá.

Obor názvů:  EnvDTE90
Sestavení:  EnvDTE90 (v EnvDTE90.dll)

Syntaxe

'Deklarace
ReadOnly Property SuspendCount As Integer
    Get

Hodnota vlastnosti

Typ: System.Int32
Celé číslo představující počet podprocesu byla pozastavena příkazem ladicího programu.

Implementuje

Thread.SuspendCount

Příklady

Následující příklad demonstruje použití Collection vlastnost.

Tato vlastnost testování:

  1. Nastavte bod přerušení uvnitř pracovník metody zpětného volání podprocesu.

  2. Cílová aplikace spouštět v režimu ladění.

  3. Doplněk spusťte po ukončení aplikace na bod přerušení.

Shared Sub ThreadProperties(ByRef dte As EnvDTE80.DTE2)
    Dim str As String
    Dim threads As EnvDTE.Threads = dte.Debugger.CurrentProgram.Threads
    str = "Number of items in the Thread collection: " + _
      threads.Item(1).Collection.Count.ToString()
    For Each thread As EnvDTE90.Thread2 In threads
        str += vbCrLf + vbCrLf + "  Thread: " + thread.ID.ToString()
        str += vbCrLf + "    Edition of the environment: " + 
          thread.DTE.Edition
        str += vbCrLf + "    Is alive: " + thread.IsAlive.ToString()
        str += vbCrLf + "    Is frozen: " + thread.IsFrozen.ToString()
        str += vbCrLf + "    Location: " + thread.Location
        str += vbCrLf + "    Parent's current mode: " + _
               thread.Parent.CurrentMode.ToString()
        str += vbCrLf + "    Priority: " + thread.Priority
        str += vbCrLf + "    Program name: " + thread.Program.Name
        str += vbCrLf + "    Number of stack frames: " + _
               thread.StackFrames.Count.ToString()
        str += vbCrLf + "    Suspended number of times: " + _
               thread.SuspendCount.ToString()
        str += vbCrLf + "    Flag on the thread: " + _
               thread.Flag.ToString()
    Next
    MessageBox.Show(str, "Thread Test - Properties")
End Sub

Zabezpečení rozhraní .NET Framework

Viz také

Odkaz

Thread2 Rozhraní

SuspendCount – přetížení

EnvDTE90 – obor názvů

Další zdroje

Working With Threads and Processes

Automation Object Model Chart

How to: Use the Threads Window