public void WriteMembers(object instance, ISerialiserNode parentNode, Type type) { var typeName = typeNamesCache.GetTypeName(type); using (var listNode = ownerDocument.CreateListElement(typeName, parentNode)) { WriteItems(listNode, (IList)instance); } }