A sequence member in an IDL struct should map to a read-only property
Source: Real-Time Innovations ( Fernando Garcia-Aranda)
The spec indicates that all members of a class or struct are mapped to read-write properties, as shown in 220.127.116.11.1:
However sequence members (IList) should map to read-only properties.
Rationale: C# best practices recommend this change: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2227?view=vs-2019
For example, a vendor may decide to use an implementation of IList that allows accessing the memory directly (via unsafe code or Span) to optimize its serialization. If end users are allowed to completely replace the list, they may inadvertently provide a different IList| implementation that the vendor code can't serialize optimally or can't handle at all.
The same could apply to Maps.
Reported: IDL4-CSHARP 1.0a1 — Sun, 22 Mar 2020 20:10 GMT
Updated: Tue, 23 Jun 2020 18:57 GMT