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(CollectionExtensions.CreateAndPopulate(createType, items)); }
public static ICollection <int> ParseIntCollection(string value, Type createType) { var items = DeserializeArrayWithElements <int, TSerializer> .ParseGenericArray(value, x => int.Parse(x)); return(CollectionExtensions.CreateAndPopulate(createType, items)); }
public static ICollection <string> ParseStringCollection(string value, Type createType) { var items = DeserializeArrayWithElements <string, TSerializer> .ParseGenericArray(value, Serializer.ParseString); return(CollectionExtensions.CreateAndPopulate(createType, items)); }