Example #1
0
        public void Clear()
        {
            TrafficViewerFile tvf  = MakeDummyTrafficFile();
            TempFile          temp = new TempFile(".tvf");

            tvf.Save(temp.Path);
            Assert.AreNotSame(0, tvf.RequestCount);

            tvf.Clear(false);

            Assert.AreEqual(0, tvf.RequestCount);
            int i = -1;

            Assert.IsNull(tvf.GetNext(ref i));

            tvf.Close(false);
        }
Example #2
0
        private void Clear(object param)
        {
            bool shouldClearSource = (bool)param;

            bool tail = Tail;

            if (tail)
            {
                Tail = false;
            }

            _trafficViewerFile.Clear(shouldClearSource);


            if (tail)
            {
                TrafficViewer.Instance.Tail = true;
            }
        }