lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeme <>
Subject [GitHub] lucenenet pull request #:
Date Fri, 15 Sep 2017 07:29:32 GMT
Github user jeme commented on the pull request:
    Does this make any sense to change?... The only thing it does is making the dictionary
readonly for the ReplicatorService. If we desired that then we could just wrap it in the constructor
    If the desired is to make it impossible to change the "shards/indexes" after the replicator
is started, this doesn't do that the one providing you with the dictionary can still change
the internal structure:
    Dictionary<string, string> dict = ...;
    ReadOnlyDictionary<string, string> rdict = new ReadOnlyDictionary<string, string>(dict);
    dict["addmee"] = "YES"; // Readonly dictionary changed because the underlying dictionary
    So if that is the desire, we need to copy the content instead.


View raw message