Ejemplo n.º 1
0
 /// <summary>
 /// Getter for an item in log entry table
 /// </summary>
 /// <param name="entryId">entry Id</param>
 /// <returns>the original log entry from the log file</returns>
 public string this[EntryId entryId]
 {
     get
     {
         if (entryId.Value >= 0 && entryId.Value < logEntries.Count)
         {
             lock (logEntries)
             {
                 return(logEntries[entryId.Value]);
             }
         }
         else
         {
             Console.ForegroundColor = ConsoleColor.Red;
             Console.WriteLine("index out of range for long entry {0}>={1}", entryId, logEntries.Count);
             Console.ForegroundColor = ConsoleColor.White;
             return(null);
         }
     }
 }
Ejemplo n.º 2
0
 override public bool Contains(EntryId id)
 {
     return(matches.Contains(id));
 }
Ejemplo n.º 3
0
 public void Add(EntryId n)
 {
     matches.Add(n);
 }
Ejemplo n.º 4
0
 override public bool Contains(EntryId id)
 {
     return(low <= id.Value && high >= id.Value);
 }
Ejemplo n.º 5
0
 public RangeMatchSet(EntryId from, EntryId to)
 {
     low  = from.Value;
     high = to.Value;
 }