Ejemplo n.º 1
0
        public CollectionBuildSettingEntry(PListDictionary dic)
            : base(dic)
        {
            //try to get array with new key
            var array = dic.ArrayValue(VALUE_KEY);

            //then try with old key
            if (array == null)
            {
                array = dic.ArrayValue(OLD_VALUE_KEY);
            }

            //get the values
            if (array != null)
            {
                Values = new List <string>();
                Values.AddRange(array.ToStringArray());
            }
            //if all failed see if it is a string (could be a custom string that is now known about.
            else
            {
                var strVal = dic.StringValue(VALUE_KEY);
                Values = StringUtils.StringListToList(strVal);
            }

            MergeMethod m;

            if (dic.EnumValue(MERGE_KEY, out m))
            {
                Merge = m;
            }
            else
            {
                Merge = MergeMethod.Append;
            }
        }