Example #1
0
 protected bool Equals(Collection other)
 {
     return(Id == other.Id &&
            ArrayStrings.EquivalentTo(other.ArrayStrings) &&
            SetStrings.EquivalentTo(other.SetStrings) &&
            ListStrings.EquivalentTo(other.ListStrings) &&
            ArrayInts.EquivalentTo(other.ArrayInts) &&
            SetInts.EquivalentTo(other.SetInts) &&
            ListInts.EquivalentTo(other.ListInts) &&
            DictionaryInts.EquivalentTo(other.DictionaryInts) &&
            DictionaryStrings.EquivalentTo(other.DictionaryStrings) &&
            PocoLookup.EquivalentTo(other.PocoLookup, (a, b) => a.EquivalentTo(b)) &&
            PocoLookupMap.EquivalentTo(other.PocoLookupMap, (a, b) => a.EquivalentTo(b, (m1, m2) => m1.EquivalentTo(m2))));
 }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (ArrayStrings != null ? ArrayStrings.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SetStrings != null ? SetStrings.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ListStrings != null ? ListStrings.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ArrayInts != null ? ArrayInts.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SetInts != null ? SetInts.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ListInts != null ? ListInts.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DictionaryInts != null ? DictionaryInts.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DictionaryStrings != null ? DictionaryStrings.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PocoLookup != null ? PocoLookup.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PocoLookupMap != null ? PocoLookupMap.GetHashCode() : 0);
         return(hashCode);
     }
 }