Beispiel #1
0
        public void LoadPackets(string filename)
        {
            dev           = new ResolveDevice(filename);
            dev.OnOpened += Dev_OnOpened;
            //dev.OnOpening += Dev_OnOpening;
            dev.Open();

            dev.Close();
        }
Beispiel #2
0
        public async Task LoadPacketsAsync(string filename)
        {
            Task task = Task.Run(() =>
            {
                dev           = new ResolveDevice(filename);
                dev.OnOpened += Dev_OnOpened;
                //dev.OnOpening += Dev_OnOpening;
                dev.Open();

                dev.Close();
            });
            await task;
        }
        public void ResovleDevice_Test()
        {
            string captureFilename = @"..\..\CapturedFiles\20140813-150920_0005ED9B-50+60_MMS.pcap";
            // string captureFilename = @"..\..\CapturedFiles\20140725-210910_00036E3E-20+20_RcdD05.pcap";
            //string captureFilename = @"..\..\CapturedFiles\20140826-113450-10+20_RcdD05_.pcap";
            ResolveDevice dev   = new ResolveDevice(captureFilename);
            DateTime      start = DateTime.Now;

            dev.Open();
            // some works here
            dev.Close();
            DateTime end = DateTime.Now;

            Console.WriteLine("Time eclapsed: {0}", (end - start).TotalSeconds);
            Console.WriteLine("Done.");
        }