示例#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);
 }