/// <summary> /// Correlate this event with other event via <see cref="T:Coding4Fun.VisualStudio.Telemetry.TelemetryEventCorrelation" /> with description information. /// </summary> /// <param name="correlation">The property <see cref="P:Coding4Fun.VisualStudio.Telemetry.TelemetryEvent.Correlation" /> of correlated event.</param> /// <param name="description"> /// A description string for this correlation information, such as name, hint, tag, category. /// Please don't include comma which is a reserved char. /// It could be null or empty string. /// </param> /// <remarks> /// This method is not thread-safe. /// </remarks> protected void CorrelateWithDescription(TelemetryEventCorrelation correlation, string description) { if (description != null && description.Contains(',')) { throw new ArgumentException("Comma is not allowed.", "description"); } if (!correlation.IsEmpty && !Correlation.Equals(correlation)) { if (CorrelatedWith == null) { CorrelatedWith = new Dictionary <TelemetryEventCorrelation, string>(); } CorrelatedWith[correlation] = description; } }