コード例 #1
0
        public static Dictionary <Guid, guidanceExplorer> getGuidanceExplorerObjects(this string pathXmlLibraries)
        {
            var guidanceExplorers         = new Dictionary <Guid, guidanceExplorer>();
            var guidanceExplorersXmlFiles = pathXmlLibraries.getGuidanceExplorerFilesInPath();

            foreach (var xmlFile in guidanceExplorersXmlFiles)
            {
                guidanceExplorers.addGuidanceExplorerObject(xmlFile);
            }

            return(guidanceExplorers);
        }
        public static Dictionary <Guid, guidanceExplorer> getGuidanceExplorerObjects(this string pathXmlLibraries)
        {
            //"in getGuidanceExplorerObjects".info();
            var guidanceExplorers = new Dictionary <Guid, guidanceExplorer>();

            //try first to load the library by finding it on the library root (original mode)
            foreach (var xmlFile in pathXmlLibraries.files("*.xml"))
            {
                guidanceExplorers.addGuidanceExplorerObject(xmlFile);
            }

            //then try to find the guidanceItems xml file by looking for an xml file with the same name as the folder
            //this has to be done like this or the save and rename of libraries will not work
            foreach (var folder in pathXmlLibraries.folders())
            {
                var xmlFile = "{0}\\{1}.xml".format(folder, folder.fileName());
                if (xmlFile.fileExists())
                {
                    guidanceExplorers.addGuidanceExplorerObject(xmlFile);
                }
            }
            return(guidanceExplorers);
        }
コード例 #3
0
        public static Dictionary <Guid, guidanceExplorer> addGuidanceExplorerObject(this Dictionary <Guid, guidanceExplorer> guidanceExplorers, string xmlFile)
        {
            var guidanceExplorer = xmlFile.getGuidanceExplorerObject();

            return(guidanceExplorers.addGuidanceExplorerObject(guidanceExplorer, xmlFile));
        }
        public static Dictionary<Guid, guidanceExplorer> getGuidanceExplorerObjects(this string pathXmlLibraries)
        {
            //"in getGuidanceExplorerObjects".info();
            var guidanceExplorers = new Dictionary<Guid,guidanceExplorer>();

            //try first to load the library by finding it on the library root (original mode)
            foreach(var xmlFile in pathXmlLibraries.files("*.xml"))
                guidanceExplorers.addGuidanceExplorerObject(xmlFile);

            //then try to find the guidanceItems xml file by looking for an xml file with the same name as the folder
            //this has to be done like this or the save and rename of libraries will not work
            foreach(var folder in pathXmlLibraries.folders())
            {
                var xmlFile = "{0}\\{1}.xml".format(folder, folder.fileName());
                if(xmlFile.fileExists())
                {
                    guidanceExplorers.addGuidanceExplorerObject(xmlFile);
                }
            }
            return guidanceExplorers;
        }
コード例 #5
0
        public static Dictionary<Guid, guidanceExplorer> getGuidanceExplorerObjects(this string pathXmlLibraries)
        {
            var guidanceExplorers           = new Dictionary<Guid,guidanceExplorer>();
            var guidanceExplorersXmlFiles   = pathXmlLibraries.getGuidanceExplorerFilesInPath();

            foreach(var xmlFile in guidanceExplorersXmlFiles)
                guidanceExplorers.addGuidanceExplorerObject(xmlFile);
            return guidanceExplorers;
        }