Ejemplo n.º 1
0
 void eventLog_EntryWritten(object sender, EntryWrittenEventArgs e)
 {
     lock (_syncLockEventLog)
     {
         if (_eventLogDictionary.ContainsKey(e.Entry.Source))
         {
             EventViewerEvent eventViewerEntry = new EventViewerEvent(e.Entry);
             _lstEvent.Add(eventViewerEntry);
         }
     }
 }
Ejemplo n.º 2
0
        public object Clone()
        {
            EventViewerEvent eventViewerEntry = new EventViewerEvent();

            eventViewerEntry._instanceId    = this.InstanceID;
            eventViewerEntry._message       = this.Message;
            eventViewerEntry._type          = this.EventType;
            eventViewerEntry._source        = this.Source;
            eventViewerEntry._timeGenerated = this.TimeGenerated;
            eventViewerEntry._node          = this.Machine;
            return(eventViewerEntry);
        }