Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Coding4Fun.VisualStudio.Telemetry.OperationEvent" /> class.
 /// </summary>
 /// <param name="eventName">
 /// 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;
 /// </param>
 /// <param name="eventType">The type of event.</param>
 /// <param name="stageType">The type of operation.</param>
 /// <param name="result">the result of this user task. If the result is Failure, recommend correlate with <see cref="T:Coding4Fun.VisualStudio.Telemetry.FaultEvent" />.</param>
 /// <param name="resultSummary">
 /// 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 <see cref="T:Coding4Fun.VisualStudio.Telemetry.FaultEvent" />.
 /// E.g., "sign in failed because of wrong credential", "user cancelled azure deployment".
 /// Default value is null.
 /// </param>
 internal OperationEvent(string eventName, DataModelEventType eventType, OperationStageType stageType, TelemetryResult result, string resultSummary = null)
     : base(eventName, TelemetrySeverity.Normal, eventType)
 {
     if (eventType != 0 && eventType != DataModelEventType.Operation)
     {
         throw new ArgumentException("Expect DataModelEventType UserTask or Operation only.", "eventType");
     }
     DataModelEventNameHelper.SetProductFeatureEntityName(this);
     StageType = stageType;
     SetResultProperties(result, resultSummary);
 }
Exemple #2
0
 private string GetOperationStageTypeName(OperationStageType operationType)
 {
     return(operationType.ToString());
 }
Exemple #3
0
 /// <summary>
 /// Create an operation event with specified information.
 /// </summary>
 /// <param name="eventName">
 /// 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;
 /// </param>
 /// <param name="stageType">operation stage type.</param>
 /// <param name="result">the result of this user task. If the result is Failure, recommend correlate with <see cref="T:Coding4Fun.VisualStudio.Telemetry.FaultEvent" />.</param>
 /// <param name="resultSummary">
 /// 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 <see cref="T:Coding4Fun.VisualStudio.Telemetry.FaultEvent" />.
 /// E.g., "sign in failed because of wrong credential", "user cancelled azure deployment".
 /// Default value is null.
 /// </param>
 internal OperationEvent(string eventName, OperationStageType stageType, TelemetryResult result, string resultSummary = null)
     : this(eventName, DataModelEventType.Operation, stageType, result, resultSummary)
 {
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Coding4Fun.VisualStudio.Telemetry.UserTaskEvent" /> class.
 /// </summary>
 /// <param name="eventName">
 /// 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;
 /// </param>
 /// <param name="stageType">The stage of User Task.</param>
 /// <param name="result">the result of this user task. If the result is Failure, recommend correlate with <see cref="T:Coding4Fun.VisualStudio.Telemetry.FaultEvent" />.</param>
 /// <param name="resultSummary">
 /// 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 <see cref="T:Coding4Fun.VisualStudio.Telemetry.FaultEvent" />.
 /// E.g., "sign in failed because of wrong credential", "user cancelled azure deployment".
 /// Default value is null.
 /// </param>
 internal UserTaskEvent(string eventName, OperationStageType stageType, TelemetryResult result, string resultSummary = null)
     : base(eventName, DataModelEventType.UserTask, stageType, result, resultSummary)
 {
     base.Severity = TelemetrySeverity.High;
 }