Open sarahelsaig opened 2 years ago
Following up here. Yep, we'd need to support those three scenarios indeed. IReadOnlyList<T>
should be fairly straightforward since we don't actually need to do anything with it on the hardware, it can be an array (since write access to it is prevented in the .NET level already).
As mentioned here:
We need:
ulong[] GetSegments() => _segments.Clone();
: return the clone of an array backing field from a function.IReadOnlyList<ulong> GetSegments() => _segments;
: return the backing field directly as an immutable collection.public IReadOnlyList<ulong> Segments => _segments;
: do the same from a get-only property.Jira issue