Ejemplo n.º 1
0
        public static TM_FileStorage saveVirtualArticles(this TM_FileStorage tmFileStorage)
        {
            var virtualArticlesFile = tmFileStorage.getVirtualArticlesFile();

            var virtualArticles = tmFileStorage.tmXmlDatabase().getVirtualArticles().Values.toList();

            virtualArticles.saveAs(virtualArticlesFile);
            return(tmFileStorage);
        }
Ejemplo n.º 2
0
        public static List <VirtualArticleAction> loadVirtualArticles_FromDisk(this TM_FileStorage tmFileStorage)
        {
            var virtualArticlesFile = tmFileStorage.getVirtualArticlesFile();

            if (virtualArticlesFile.fileExists())
            {
                return(virtualArticlesFile.load <List <VirtualArticleAction> >());
            }
            return(new List <VirtualArticleAction>());
        }