Ejemplo n.º 1
0
        private void LoadTimeStamps()
        {
            if (_currentTime != default(DateTime) && _finder != null)
            {
                try
                {
                    _browser.Document.All["sectionsDiv"].InnerText = String.Empty;

                    List <ByteArrayBuilder> entries = _finder.Find(_currentTime, RANGE);

                    foreach (ByteArrayBuilder bytes in entries)
                    {
                        AddSection(Constants.DefaultEncoding.GetString(bytes.ToArray()));
                    }
                }
                catch { }
            }
        }
Ejemplo n.º 2
0
        public void TestLogSyncTimeStampsFinder()
        {
            TempFile temp = new TempFile(".txt");

            temp.Write(Properties.Resources.ItemLog);

            TimeStampsFinder finder = new TimeStampsFinder(temp.Path);

            DateTime ts = new DateTime(2010, 09, 10, 13, 53, 55);

            List <ByteArrayBuilder> list = finder.Find(ts, 1);

            Assert.AreEqual(2, list.Count);

            string firstEntry = Constants.DefaultEncoding.GetString(list[0].ToArray());

            Assert.IsTrue(firstEntry.Contains("WEO"));
        }