Udostępnij za pośrednictwem


Właściwość DataCollection.CurrentId —

Właściwość CurrentId zwraca pseudo-token dla identyfikatora wątku lub identyfikator procesu w wywołaniu NameProfile, StartProfile, StopProfile, SuspendProfile i ResumeProfile.Właociwooci tej można użyć spowodować metodę, która ma działać na bieżący wątek lub proces, a nie jeden wyraźnie wskazane.

Przestrzeń nazw:  Microsoft.VisualStudio.Profiler
Zestaw:  Microsoft.VisualStudio.Profiler (w Microsoft.VisualStudio.Profiler.dll)

Składnia

'Deklaracja
Public Shared ReadOnly Property CurrentId As UInteger
public static uint CurrentId { get; }
public:
static property unsigned int CurrentId {
    unsigned int get ();
}
static member CurrentId : uint32
static function get CurrentId () : uint

Wartość właściwości

Typ: System.UInt32
Wartość całkowita bez znaku dla identyfikatora procesu lub wątku.

Przykłady

Poniższy przykład kodu pokazuje właściwości CurrentId.CurrentId jest przekazywana jako parametr w wywołaniu DataCollection.NameProfile do identyfikowania bieżący identyfikator wątku.

        public void ExerciseCommentMarkAtProfile()
        {
            // Declare and initalize variables to pass to 
            // CommentMarkAtProfile.  The values of these 
            // parameters are assigned based on the needs 
            // of the code; and for the sake of simplicity
            // in this example, the variables are assigned
            // arbitrary values.
            long timestamp = 0x1111;
            int markId = 01;
            string markText = "Exercising CommentMarkAtProfile...";

            // Declare MarkOperationResult Enumerator.  
            // Holds return value from call to CommentMarkAtProfile.
            MarkOperationResult markResult;

            markResult = DataCollection.CommentMarkAtProfile(
                timestamp,
                markId,
                markText);

            // Check result of CommentMarkAtProfile call.
            Console.WriteLine("CommentMarkAtProfile returned {0}",
                markResult); 
        }

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

DataCollection Klasa

Przestrzeń nazw Microsoft.VisualStudio.Profiler