コード例 #1
0
        public static ICollection <T> ParseCollection <T>(string value, Type createType, ParseStringDelegate parseFn)
        {
            if (value == null)
            {
                return(null);
            }

            var items = DeserializeArrayWithElements <T, TSerializer> .ParseGenericArray(value, parseFn);

            return(CreateAndPopulate(createType, items));
        }
コード例 #2
0
        public static ICollection <int> ParseIntCollection(string value, Type createType)
        {
            var items = DeserializeArrayWithElements <int, TSerializer> .ParseGenericArray(value, x => int.Parse(x));

            return(CreateAndPopulate(createType, items));
        }
コード例 #3
0
        public static ICollection <string> ParseStringCollection(string value, Type createType)
        {
            var items = DeserializeArrayWithElements <string, TSerializer> .ParseGenericArray(value, Serializer.ParseString);

            return(CreateAndPopulate(createType, items));
        }