Udostępnij za pośrednictwem


Właściwość DataCollection.CurrentId —

Właściwość Bieżący ID zwraca token pseudo dla identyfikatora wątku lub identyfikator procesu w wywołaniu NameProfile, StartProfile, StopProfile, SuspendProfile i ResumeProfile.Ta właściwość umożliwia powodować metody do pracy na bieżącego wątku lub procesu, a nie jednym wyraźnie wskazany.

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 with get
static function get CurrentId () : uint

Wartość właściwości

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

Przykłady

Poniższy przykład kodu pokazuje bieżący ID właściwości. Bieżący ID 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