internal IEnumerable <EventHandle> GetEventCorrelations(EventHandle handle) { if (EventCorrelations.ContainsKey(handle)) { return(EventCorrelations[handle]); } return(new List <EventHandle>()); }
private void CorrelateEvents(EventHandle first, EventHandle second) { if (EventCorrelations.ContainsKey(first)) { if (!EventCorrelations[first].Contains(second)) { EventCorrelations[first].Add(second); } } else { lock (EventCorrelations) { EventCorrelations.Add(first, new List <EventHandle>() { second }); } } }
protected bool Equals(EventHandle other) { return(PublisherNodeId == other.PublisherNodeId && EventId == other.EventId && PublisherId == other.PublisherId); }
/// <summary> /// Adds a new event correlation. Checks if this pair is already present and adds it if not. /// </summary> /// <param name="first">The first.</param> /// <param name="second">The second.</param> internal void AddEventCorrelation(EventHandle first, EventHandle second) { CorrelateEvents(first, second); CorrelateEvents(second, first); }