public void AddEntry(string name, string type, byte[] data) { var entry = Entries.FirstOrDefault(e => e.Name == name && e.Type == type); if (entry == null) { entry = new ResourceEntry() { Name = name, Type = type, Data = data }; Entries.Add(entry); } else { entry.Data = data; } IsChanged = true; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsChanged))); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Entries))); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CanBeSaved))); }