public bool WriteLinks() { cFile oFile = new cFile(msExportedLinkPath); try { string sOutput = "" + msUrlList[0]; //oFile.FileName = msExportedLinkPath; for (int i = 1; i < msUrlList.Count; i++) { sOutput += Environment.NewLine + msUrlList[i]; } oFile.Write(sOutput); Parallel.For(0, sFileList.Count, x => { oFile.FileName = sFileList[x]; oFile.Delete(); }); return(true); } catch (Exception ex) { oFile.WriteLog(ex.Message, "WriteLinksError.log"); return(false); throw ex; } }
public bool Save() { // Delete the output file cFile oFile = new cFile(); oFile.Delete(); oFile = null; //foreach (cLinkCategory oLinkCategory in this) foreach (cLinkCategory oLinkCategory in oCatagories) { oLinkCategory.Save(msFileName); } return(true); }
public bool LoadToFile(string vsPath) { cFile oFile = new cFile(vsPath); try { List <String> sNewUrlList = oFile.ReadList(); Parallel.For(0, sNewUrlList.Count, x => { string sUrl1 = sNewUrlList[x]; oFile.SaveLink(sUrl1, msExportedLinkPath); }); oFile.Delete(); return(true); } catch (Exception ex) { throw ex; } //throw new NotImplementedException(); }