/// <summary> /// Updates the server package of this version. /// </summary> /// <param name="package">The server package corresponding to this version.</param> internal void UpdateServerPackage(NugetServerPackage package, IEnumerable <NugetServerPackage> alternateVersions) { OnPropertyChanging(nameof(FullName), nameof(Version)); ServerPackage = package; OnPropertyChanged(nameof(FullName), nameof(Version)); // Always keep track of highest version if (ServerPackage != null && (LatestServerPackage == null || LatestServerPackage.Version < ServerPackage.Version)) { LatestServerPackage = ServerPackage; } Dispatcher.Invoke(UpdateStatus); if (alternateVersions != null) { Dispatcher.Invoke(() => UpdateAlternateVersions(alternateVersions, (alternateVersionViewModel, alternateVersion) => { if (alternateVersion == null && alternateVersionViewModel.LocalPackage == null) { AlternateVersions.Remove(alternateVersionViewModel); } else { alternateVersionViewModel.UpdateServerPackage(alternateVersion); } })); } }
/// <summary> /// Updates the server package of this version. /// </summary> /// <param name="package">The server package corresponding to this version.</param> internal void UpdateServerPackage(NugetServerPackage package) { ServerPackage = package; Dispatcher.Invoke(UpdateStatus); }
internal void UpdateServerPackage(NugetServerPackage package) { OnPropertyChanging(nameof(FullName), nameof(Version)); ServerPackage = package; OnPropertyChanged(nameof(FullName), nameof(Version)); }