Changing Microsoft.Data.SqlClient diagnostic format
I contribute to Microsoft.Data.SqlClient and one of the recent issues we've had opened is to do with making the diagnostic information trim safe https://github.com/dotnet/SqlClient/issues/2184
Changing from using anonymous types to strong types is mostly just writing the types and getting it built which isn't too hard. I'm basing my changes on ones done for aspnet https://github.com/dotnet/aspnetcore/pull/11730 so they have public get-only properties and directly implemented enumerators, they are reflection free.
I am wondering how upstream callers like OTel will need to change (if at all) to consume the new classes and whether there is something I may be able to build into the new classes to assist or enable that. I'm also wondering if the order of properties or pairs is important and if changing them may cause problems. Are there things I can do to make life easier for consumers? Are there things to avoid?