Exemple #1
0
        public PlatformConfiguration(PListDictionary dic)
        {
            if (dic == null)
            {
                return;
            }

            var configs = dic.DictionaryValue(CONFIGURATIONS_KEY);

            if (configs != null && configs.Count > 0)
            {
                foreach (var kvp in configs)
                {
                    var entries = kvp.Value as PListArray;

                    if (entries == null || entries.Count <= 0)
                    {
                        AddConfiguration(kvp.Key);
                        continue;
                    }

                    for (int ii = 0; ii < entries.Count; ++ii)
                    {
                        AddChangeFileToConfiguration(entries.StringValue(ii), kvp.Key);
                    }
                }
            }

            ActiveConfiguration = dic.StringValue(ACTIVE_CONFIGURATION_KEY);
            IsDirty             = false;
        }
Exemple #2
0
        void AddEnum(PListDictionary dic)
        {
            string settingName, displayName, group;

            ExtractCommon(dic, out settingName, out displayName, out group);
            var valueDic = dic.DictionaryValue(VALUE_KEY);

            if (valueDic != null)
            {
                List <string> enumValues   = new List <string>();
                List <string> enumNames    = new List <string>();
                int           defaultIndex = dic.IntValue(DEFAULT_INDEX);

                foreach (var key in valueDic.Keys)
                {
                    enumValues.Add(key);
                    enumNames.Add(valueDic.StringValue(key));
                }

                _settings[settingName] = new EnumBuildSetting(settingName, displayName, group, enumValues.ToArray(), enumNames.ToArray(), defaultIndex);
            }
        }