Github user NightOwl888 commented on the pull request:
https://github.com/apache/lucenenet/commit/34ef2ce56c48beeb36e3a608c5339b84b36a5414#commitcomment-24319196
Just thinking a couple of steps ahead. `IDictionary<TKey, TValue>` doesn't
inherit `IReadOnlyDictionary<TKey, TValue>`. But when wiring up
[`IReplicatorAccessor`](https://github.com/apache/lucenenet/pull/209#issuecomment-320473287)
(which would be common in all of the UI frameworks), it would be preferable to
use `IReadOnlyDictionary<TKey, TValue>` there to prevent users from meddling
with the singleton-registered items. So, this would be the only way to allow
that property to be passed into `ReplicationService` without a cast (assuming
the dictionary implementation even implemented both interfaces, which isn't
guaranteed).
BTW - do you have the code that you originally submitted with the read-only
interfaces? When I asked you to pull them out, I thought that replicator was
more tightly integrated with the other modules and needed to interoperate with
them more. But since that is not the case, there may be more benefit in making
them read-only like you had originally.
---