private int GetTotal() { if (!SelectedGroup.HasValue()) { return(ExceptionStores.TotalExceptionCount); } var group = Groups.Find(g => g.Name == SelectedGroup); if (group != null && SelectedLog.HasValue()) { return(group.Applications.Find(a => a.Name == SelectedLog)?.ExceptionCount ?? 0); } return(group?.Total ?? 0); }
/// <summary> /// /// </summary> /// <returns></returns> public string Copy() { var text = new StringBuilder(); foreach (var entry in SelectedLog.Cast <LogEntry>()) { text.Append(entry.DateTime.ToString("HH:mm:ss.fff", CultureInfo.InvariantCulture)); text.Append(" | "); text.AppendFormat("{0, -11}", entry.LogType); text.Append(" | "); text.Append(entry.Message); text.Append(Environment.NewLine); } return(text.ToString()); }