/// <summary> /// Remove the old <see cref="ProjectData"/> for <paramref name="id"/>, replace it with /// <paramref name="newData"/>, and and connect to <paramref name="newData"/>. /// </summary> internal void ReplaceData(ProjectId id, ProjectData newData, out ProjectData oldData) { lock (updatingProjectDataLock) { oldData = RemoveData(id); if (newData != null) { newData.Connect(); projectDataMap [id] = newData; } } }