public void AddPeerState(PeerNetworkViewState state) { lock (_syncObject) { _viewStates.TryAdd(state.PeerNetworkAddress, state); } }
public void AddPeerState(PeerNetworkViewState state) { lock (_syncObject) { if (!_viewStates.TryGetValue(state.PeerNetworkAddress, out _)) { _viewStates.Add(state.PeerNetworkAddress, state); } } }