public IEnumerable <LogLineView> GetLogLines() { var repo = new DisconnectedRepository(); var ipDetails = repo.GetIpDetails(); var lines = repo.GetLogLines(); var providers = new Providers(ipDetails); var result = lines.Select(p => new LogLineView { Date = p.Date.ToString("MM/dd/yyyy"), Time = p.Time, IpClient = p.IpClient, MediaItem = p.MediaItem, IspProvider = providers.GetValue(p.IpClient).IspProvider, Country = providers.GetValue(p.IpClient).Country, State = providers.GetValue(p.IpClient).State, Location = providers.GetValue(p.IpClient).Location, IpDetailId = providers.GetValue(p.IpClient).IpDetailId, Client = p.Client, ClientVersion = p.ClientVersion, Platform = p.Platform, IsHidden = providers.GetValue(p.IpClient).IsHidden }); return(result); }
private IEnumerable <LogLine> GetLogLines() { var repo = new DisconnectedRepository(); var files = repo.GetLogLines(); return(files); }
public void BackupDetails() { var repo = new DisconnectedRepository(); var ipDetails = repo.GetIpDetails(); var files = repo.GetLogFiles(); var lines = repo.GetLogLines(); var setting = repo.GetLocalSettings(); var backupWriter = new BackupWriter(ipDetails, lines, files, setting); var time = DateTime.Now.ToString("yyyy.dd.mm.HH.mm"); var path = setting.BackupFolder; var fileName = path + setting.BackupName + "_details_" + time + BackupFormat.Xml; backupWriter.BackupIpDetails(fileName); }
private void AddLogLine(LogLine logLine) { var repo = new DisconnectedRepository(); var files = repo.GetLogLines(); }