示例#1
0
        private object?_Deserialize(CommandLineSerializer serializer, Type objType, IList <string> values)
        {
            Type? itemType = ReflectUtil.GetListItemType(objType);
            IList list     = ReflectUtil.CreateList(objType, values.Count);

            for (var i = 0; i < values.Count; ++i)
            {
                var    v   = values[i];
                object?obj = v;
                if (itemType != null)
                {
                    obj = ValueSerializer.DeserializeSingleValue(serializer, itemType, v);
                }

                _AddValueToList(list, i, obj);
            }

            return(list);
        }