Пример #1
0
 internal IEnumerable <EventHandle> GetEventCorrelations(EventHandle handle)
 {
     if (EventCorrelations.ContainsKey(handle))
     {
         return(EventCorrelations[handle]);
     }
     return(new List <EventHandle>());
 }
Пример #2
0
 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
             });
         }
     }
 }
Пример #3
0
 protected bool Equals(EventHandle other)
 {
     return(PublisherNodeId == other.PublisherNodeId && EventId == other.EventId && PublisherId == other.PublisherId);
 }
Пример #4
0
 /// <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);
 }