示例#1
0
文件: EditFile.cs 项目: lie112/ApsimX
        /// <summary>
        /// Edit the given .apsimx file by applying changes
        /// specified in the given config file.
        /// </summary>
        /// <param name="apsimxFilePath">Absolute path to the .apsimx file.</param>
        /// <param name="configFilePath">Absolute path to the config file.</param>
        public static Simulations Do(string apsimxFilePath, string configFilePath)
        {
            Simulations file = FileFormat.ReadFromFile <Simulations>(apsimxFilePath, e => throw e, false);

            return(ApplyChanges(file, GetFactors(configFilePath)));
        }