DataCollection.CurrentId Property
The CurrentId property returns the pseudo-token for the thread id or process id, in a call to NameProfile, StartProfile, StopProfile, SuspendProfile, and ResumeProfile. Use this property to cause the method to operate on the current thread or process, rather than a specifically indicated one.
Namespace: Microsoft.VisualStudio.Profiler
Assembly: Microsoft.VisualStudio.Profiler (in Microsoft.VisualStudio.Profiler.dll)
Syntax
public static uint CurrentId { get; }
public:
property unsigned int CurrentId {
static unsigned int get();
}
static member CurrentId : uint32 with get
Public Shared ReadOnly Property CurrentId As UInteger
Property Value
Type: System.UInt32
An unsigned integer value for the process or thread identifier.
Examples
The following code example demonstrates the CurrentId property. CurrentId is passed as a parameter in the DataCollection.NameProfile call to identify the current thread identifier.
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);
}
See Also
DataCollection Class
Microsoft.VisualStudio.Profiler Namespace
Return to top