We can just expose the hidden values CounterValue using ReadOnlyCollection with only a getter. It prevents modification of the existing list. This is better since ISerializable has many issues esp Counter.values were not serialized but TimerCounter.values were. Using the additional read-only property provides a C# solution rather than relying on underlying implementation fo Newtonsoft.Json
Needs partial reverse of https://github.com/mono/monodevelop/pull/8846
Fixes #1019319
We can just expose the hidden
values
CounterValue using ReadOnlyCollection with only a getter. It prevents modification of the existing list. This is better sinceISerializable
has many issues espCounter.values
were not serialized butTimerCounter.values
were. Using the additional read-only property provides a C# solution rather than relying on underlying implementation fo Newtonsoft.Json