Ejemplo n.º 1
0
 public static LineViewModel Get(ILuceneSearcher luceneSearcher, Document document)
 {
     return(new LineViewModel
     {
         MonitorId = document.Get(LogField.MONITOR_ID),
         GroupDepth = Int32.Parse(document.Get(LogField.GROUP_DEPTH)),
         PreviousEntryType = document.Get(LogField.PREVIOUS_ENTRY_TYPE),
         PreviousLogTime = DateTools.StringToDate(document.Get(LogField.PREVIOUS_LOG_TIME)).ToString("dd/MM/yyyy HH:mm:ss.fff"),
         LogLevel = document.Get(LogField.LOG_LEVEL),
         Text = document.Get(LogField.TEXT),
         Tags = document.Get(LogField.TAGS),
         SourceFileName = document.Get(LogField.SOURCE_FILE_NAME),
         LineNumber = document.Get(LogField.LINE_NUMBER),
         LogTime = DateTools.StringToDate(document.Get(LogField.LOG_TIME)).ToString("dd/MM/yyyy HH:mm:ss.fff"),
         Exception = ExceptionViewModel.Get(luceneSearcher, document),
         AppName = document.Get(LogField.APP_NAME)
     });
 }