Exemple #1
0
        private void CheckAddresses(string excelFile, string outPath)
        {
            DebugOut("Lets check some addresses!");

            var goodAddr = new ConcurrentBag <TDayAddress>();
            var badAddr  = new ConcurrentBag <TDayAddress>();

            Stopwatch sw = new Stopwatch();

            sw.Start();
            System.Text.Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            TDayAddress.ReadExcelFile(excelFile, outPath, goodAddr, badAddr, new MsgOut(DebugOut));
            sw.Stop();
            DebugOut($"\nValidate addresses time: {sw.Elapsed}  with {goodAddr.Count} good and {badAddr.Count} failed addresses");
        }
Exemple #2
0
        private static void RunOptions(Options opts)
        {
            Console.WriteLine("Lets check some addresses!");

            var goodAddr = new ConcurrentBag <TDayAddress>();
            var badAddr  = new ConcurrentBag <TDayAddress>();

            Stopwatch sw = new Stopwatch();

            sw.Start();
            System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
            TDayAddress.ReadExcelFile(opts.excelFile, Path.GetDirectoryName(opts.excelFile), goodAddr, badAddr, new MsgOut(DebugOut));
            sw.Stop();
            string drcty = Path.GetDirectoryName(opts.excelFile);

            Console.WriteLine($"\nValidate addresses time: {sw.Elapsed}  with {goodAddr.Count} good and {badAddr.Count} failed addresses");
            Console.WriteLine($"\nData written to {drcty + "/GoodAddresses.csv"} and {drcty + "/Badddresses.csv"}");
        }