Пример #1
0
        public static BuildToolAssociationList FromFileXml(string fileName)
        {
            BuildToolAssociationList toReturn = null;

            toReturn = FileManager.XmlDeserialize <BuildToolAssociationList>(fileName);

            return(toReturn);
        }
Пример #2
0
        public static BuildToolAssociationList FromFileCsv(string fileName)
        {
            BuildToolAssociationList toReturn = new BuildToolAssociationList();

            CsvFileManager.CsvDeserializeList(typeof(BuildToolAssociation), fileName, toReturn.BuildToolList);

            return(toReturn);
        }
        public static BuildToolAssociationList FromFileCsv(string fileName)
        {

            BuildToolAssociationList toReturn = new BuildToolAssociationList();

            CsvFileManager.CsvDeserializeList(typeof(BuildToolAssociation), fileName, toReturn.BuildToolList);

            return toReturn;


        }
        internal bool LoadOrCreateProjectSpecificBuildTools(string projectFolder)
        {
            string settingsFolder = projectFolder + "GlueSettings/";

            string fileName = settingsFolder + "BuildToolAssociation.xml";


            bool wasLoaded = false;

            if (System.IO.File.Exists(fileName))
            {
                ProjectSpecificBuildTools = BuildToolAssociationList.FromFileXml(fileName);
                wasLoaded = true;
            }
            else
            {
                ProjectSpecificBuildTools = new BuildToolAssociationList();

                foreach (BuildToolAssociation bta in ProjectManager.GlueSettingsSave.BuildToolAssociations)
                {
                    ProjectSpecificBuildTools.BuildToolList.Add(bta);
                    if (!FileManager.IsRelative(bta.BuildTool))
                    {
                        bta.BuildTool = FileManager.MakeRelative(bta.BuildTool, projectFolder);
                    }
                }

                FileManager.XmlSerialize(ProjectSpecificBuildTools, fileName);
            }

            return wasLoaded;
        }