public static TM_Xml_Database saveVirtualArticles(this TM_Xml_Database tmXmlDatabase) { var virtualArticlesFile = tmXmlDatabase.getVirtualArticlesFile(); var virtualArticles = tmXmlDatabase.getVirtualArticles().Values.toList(); virtualArticles.saveAs(virtualArticlesFile); return(tmXmlDatabase); }
public static List <VirtualArticleAction> loadVirtualArticles(this TM_Xml_Database tmXmlDatabase) { var virtualArticlesFile = tmXmlDatabase.getVirtualArticlesFile(); if (virtualArticlesFile.fileExists()) { return(virtualArticlesFile.load <List <VirtualArticleAction> >()); } return(new List <VirtualArticleAction>()); }