UserTaskEvent(String, TelemetryResult, String) Constructor

Definition

Initializes a new instance of the UserTaskEvent class.

public UserTaskEvent (string eventName, Microsoft.VisualStudio.Telemetry.TelemetryResult result, string resultSummary = default);
new Microsoft.VisualStudio.Telemetry.UserTaskEvent : string * Microsoft.VisualStudio.Telemetry.TelemetryResult * string -> Microsoft.VisualStudio.Telemetry.UserTaskEvent
Public Sub New (eventName As String, result As TelemetryResult, Optional resultSummary As String = Nothing)

Parameters

eventName
String

An event name following data model schema. It requires that event name is a unique, not null or empty string. It consists of 3 parts and must follows pattern [product]/[featureName]/[entityName]. FeatureName could be a one-level feature or feature hierarchy delimited by "/". For examples, vs/platform/opensolution; vs/platform/editor/lightbulb/fixerror;

result
TelemetryResult

the result of this user task. If the result is Failure, recommend correlate with FaultEvent.

resultSummary
String

a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in FaultEvent. E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null.

Examples

This example shows how to create and post UserTaskEvent.

UserTask userTask = new UserTask("vs/debugger/stepinto", Result.Success);
TelemetryService.DefaultSession.PostEvent(userTask);

Applies to