Example #1
0
 public bool Equals(EquatableObservableCollection <T> other) => other != null && new HashSet <T>(this).SetEquals(other);
Example #2
0
 /// <summary>
 /// Initializes a new data diff element object with the given base value.
 /// </summary>
 /// <param name="owningObject">The object containing the diff element.</param>
 /// <param name="baseAttackArmorEntries">The base value of the diff element.</param>
 public AttackArmorEntryListDiffElement(DiffElementContainer owningObject, List <AttackArmorEntry> baseAttackArmorEntries)
     : base(owningObject, new EquatableObservableCollection <AttackArmorEntry>(baseAttackArmorEntries))
 {
     // Base value should be a copy of the original data element -> deep copy of list
     _baseValue = new EquatableObservableCollection <AttackArmorEntry>(baseAttackArmorEntries.Select(aae => new AttackArmorEntry(aae.ArmorClass, aae.Amount)));
 }