Esempio n. 1
0
        public bool WriteLinks(string vsPath)
        {
            try
            {
                cFile oFile = new cFile(vsPath);

                //oFile.FileName = msExportedLinkPath;
                for (int iCnt = 0; iCnt < UrlList.Count(); iCnt++)
                {
                    oFile.Write(UrlList[iCnt]);
                }
                return(true);
            }
            catch (Exception ex)
            {
                return(false);

                throw ex;
            }
        }
Esempio n. 2
0
        public override bool TestLinks()
        {
            ErrorMessages = new List <ErrorMessage>();
            var returnValue = true;

            var i = 1;

            using (var progress = new ConsoleProgressBar(UrlList.Count()))
            {
                Parallel.ForEach(UrlList, (item) =>
                {
                    var retval = TestLink(item);
                    if (returnValue && !retval)
                    {
                        returnValue = retval;
                    }

                    progress.Report(i, item.Url);
                    Interlocked.Increment(ref i);
                });
            }

            return(returnValue);
        }