public void updateNameCommentRecordCache(final NameCommentRecord commentRecord) {if(commentRecords.containsValue(commentRecord)) {for(Entry<String,NameCommentRecord> entry : commentRecords.entrySet()) {if(entry.getValue().equals(commentRecord)) {commentRecords.remove(entry.getKey());break;}}}commentRecords.put(commentRecord.getNameText(), commentRecord);}
public void UpdateNameCommentRecordCache(NameCommentRecord commentRecord){if (commentRecords.ContainsValue(commentRecord)){foreach (KeyValuePair<string, NameCommentRecord> entry in commentRecords){if (entry.Value.Equals(commentRecord)){commentRecords.Remove(entry.Key);break;}}}commentRecords[commentRecord.NameText] = commentRecord;}