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 void Collection <T, CollectionType>(CollectionType data, string name, ListElementWriter <T> writeElementWithName) where CollectionType : ICollection <T> { EnumerableSerializerWrapper <T, CollectionType> sColl = new EnumerableSerializerWrapper <T, CollectionType>(); sColl.Data = data; sColl.ElementWriter = writeElementWithName; Structure(sColl, name); }