public void AddVersionInfo(string name, string version) { foreach (var item in ComponentVersions) { if (item.Name == name) { item.Version = version; OnPropertyChanged("ComponentVersions"); return; } } ComponentVersionInfo info = new ComponentVersionInfo(); info.Name = name; info.Version = version; ComponentVersions.Add(info); }
public void AddVersionInfo(string name, string version) { foreach (ComponentVersionInfo item in ComponentVersions) { if (item.Name == name) { item.Version = version; OnPropertyChanged(nameof(ComponentVersions)); return; } } ComponentVersionInfo info = new ComponentVersionInfo { Name = name, Version = version }; ComponentVersions.Add(info); }