private string csv(IEventLogRecord record)
 {
     //ComputerName, [Logfile], [CategoryString], Type, User, [EventCode], SourceName, EventIdentifier, Message, [RecordNumber], TimeGenerated
     return(string.Format("{0},{1},{2},{3},{4},{5},{6},\"{7}\",{8},{9}",
                          record.Computer, string.Empty, record.Type, record.User, string.Empty, record.Source,
                          record.EventId,
                          sanitizeString(record), string.Empty, record.GeneratedTime));
 }
 private string csv(IEventLogRecord record)
 {
     //ComputerName, [Logfile], [CategoryString], Type, User, [EventCode], SourceName, EventIdentifier, Message, [RecordNumber], TimeGenerated
     return string.Format("{0},{1},{2},{3},{4},{5},{6},\"{7}\",{8},{9}",
                          record.Computer, string.Empty, record.Type, record.User, string.Empty, record.Source,
                          record.EventId,
                          sanitizeString(record), string.Empty, record.GeneratedTime);
 }
 public bool Filter(IEventLogRecord record)
 {
     foreach (IInputFilter filter in _filters)
     {
         if (!filter.Filter(record))
             return false;
     }
     return true;
 }
Beispiel #4
0
 public bool Filter(IEventLogRecord record)
 {
     foreach (IInputFilter filter in _filters)
     {
         if (!filter.Filter(record))
         {
             return(false);
         }
     }
     return(true);
 }
 private string sanitizeString(IEventLogRecord record)
 {
     return record.Message.Replace("\"", "\"\"");
 }
 public bool Filter(IEventLogRecord recordToFilter)
 {
     return false;
 }
Beispiel #7
0
 private object getPropertyFrom(IEventLogRecord recordToFilter)
 {
     return(typeof(IEventLogRecord).GetProperty(_propertyName).GetValue(recordToFilter, null));
 }
Beispiel #8
0
        public bool Filter(IEventLogRecord recordToFilter)
        {
            PropertyType propertyValue = (PropertyType)getPropertyFrom(recordToFilter);

            return(recordMatchesCriteria(propertyValue));
        }
 private string sanitizeString(IEventLogRecord record)
 {
     return(record.Message.Replace("\"", "\"\""));
 }
 public bool Filter(IEventLogRecord recordToFilter)
 {
     return(false);
 }