public void List <T, ListType>(ListType data, string name, ListElementWriter <T> writeElementWithName) where ListType : IList <T> { ListSerializerWrapper <T, ListType> sList = new ListSerializerWrapper <T, ListType>(); sList.Data = data; sList.ElementWriter = writeElementWithName; Structure(sList, name); }
public ListType List <T, ListType>(string name, ListElementReader <T> readElementWithName, Func <int, ListType> createListWithCapacity) where ListType : IList <T> { ListSerializerWrapper <T, ListType> sList = new ListSerializerWrapper <T, ListType>(); sList.ElementReader = readElementWithName; sList.ListFactoryFromCapacity = createListWithCapacity; Structure(sList, name); return(sList.Data); }