[FEATURE REQ] Add compatibility for ModelReaderWriter + Collections + AOT #48292
Labels
Client
This issue points to a problem in the data-plane of the library.
System.ClientModel
Base Core library
Library name
System.ClientModel
Please describe the feature.
Right now if you want to read or write an
IPersistableModel<T>
you can simply send it toModelReaderWriter.Write
orModelReaderWriter.Read
and specify the format you want for xml vs json etc.This does not work with collections of
IPersistableModel<T>
since when using AOT as well we won't be able to use reflection to create all the collections.To fix this we will be introducing a new overload to Read which will take in a context which will allow the construction to happen without relying on reflection and be fully compatible with AOT. The old Read overload will get the RequiresUnreferencedCode attribute which means although it will still work in non AOT cases it won't be compatible with AOT.
The text was updated successfully, but these errors were encountered: