예제 #1
0
        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);
        }
예제 #2
0
        private IEnumerable <LogLine> GetLogLines()
        {
            var repo  = new DisconnectedRepository();
            var files = repo.GetLogLines();


            return(files);
        }
예제 #3
0
        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);
        }
예제 #4
0
 private void AddLogLine(LogLine logLine)
 {
     var repo  = new DisconnectedRepository();
     var files = repo.GetLogLines();
 }