/// <summary> /// Initializes a new instance of the <see cref="MessageContext" /> class. /// </summary> /// <param name="exception">The exception.</param> /// <param name="tags">The tags.</param> /// <param name="data">The data.</param> /// <param name="user">The user.</param> public MessageContext(Exception exception = null, List <string> tags = null, IDictionary data = null, IUserInfo user = null) { Exception = exception; Tags = tags; Data = data; User = user; Group = new MessageGroup(); }
/// <summary> /// Method used to bind to the CustomGroupingKey event of the RaygunClient object /// </summary> /// <param name="sender">the Raygun client object firing the event</param> /// <param name="e">The custom group arguments of the RaygunClient message</param> /// <param name="group">The message group that contains the data to tell the Raygun client how to group the message</param> private void HandleGrouping(object sender, RaygunCustomGroupingKeyEventArgs e, IMessageGroup group) { //Only override the grouping if specified if (!String.IsNullOrEmpty(group.GroupKey)) { e.CustomGroupingKey = group.GroupKey; } OnGrouping?.Invoke(sender, e, group); }