예제 #1
0
        private void ParseModel(BuildConfigModel model)
        {
            DefaultLanguage = model.DefaultLanguage.Trim();

            string[] packageTypes = model.PackageType.Trim().Split('|');

            if (packageTypes.Contains("in_app_test"))
            {
                NeedInAppTestPackage = true;
            }

            if (packageTypes.Contains("release"))
            {
                NeedReleasePackage = true;
            }
        }
예제 #2
0
        private void Parse(string filePath)
        {
            try
            {
                string file = File.ReadAllText(filePath);

                XmlSerializer serializer = new XmlSerializer(typeof(BuildConfigModel));
                using (TextReader reader = new StringReader(file))
                {
                    BuildConfigModel model = (BuildConfigModel)serializer.Deserialize(reader);
                    ParseModel(model);
                }
            }
            catch (Exception ex)
            {
                throw new BuildSystemException("Failed to read build config file.", ex);
            }
        }