You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstractions: - All references to (Type, string) tuples have been changed to PolymorphicMapping for DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor), improving trim/AOT analysis. Previously, code analysis could fail if the warning was traced to XmlSerializationOptions.cs via ProjectReference.
Method definitions with a Type-type parameter will now warn with IL2077 if the argument is not annotated as public-parameterless constructor.
implicit conversions between (Type,string) and PolymorphicMapping have been removed because the public-parameterless-constructor annotations are lost in conversion.
record-class XmlSourceGenerator.Abstractions.XmlPropertySettings.PolymorphicMapping has been moved to XmlSourceGenerator.Abstractions.PolymorphicMapping
Overload WriteDataToStreamAsync<T>(Stream stream, IEnumerable<T> items, XmlSerializationOptions? options = null, string rootName = "ArrayOfItems", string? itemName = null) has been removed. Calls to WriteDataToStreamAsync<T>(Stream stream, T item, XmlSerializationOptions? options = null, string? rootName = null, string? itemName = null) where T : IEnumerable will throw an ArgumentException telling you to use WriteEnumerableDataToStreamAsync.
Features
Abstractions: add XmlPropertySettings.PolymorphicMapping to replace (Type, string) tuple + constraints on Type (cebc7e5)
add GeneratorTypeModel.IsNullableAnnotated to track symbols whose types have ? annotation (1144246)
Abstractions: resolve some IL2077 'Type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' warnings; annotate generated Type field as PublicParameterlessConstructor; annotated Type parameters (b559d3d)
add new modifier to generated IXmlStreamable members when a base class implements it manually or via XmlAutoGenerate (617d025), closes upstream#10