int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) { return(FdbTuple.CombineHashCodes( this.Head != null ? this.Head.GetHashCode(comparer) : 0, this.Tail != null ? this.Tail.GetHashCode(comparer) : 0 )); }
int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) { return(FdbTuple.CombineHashCodes( comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2) )); }
int IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) { return(FdbTuple.CombineHashCodes( m_prefix.GetHashCode(), comparer.GetHashCode(m_items) )); }
int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { return(FdbTuple.CombineHashCodes( comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3) )); }
int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { bool canUseCache = object.ReferenceEquals(comparer, SimilarValueComparer.Default); if (m_hashCode.HasValue && canUseCache) { return(m_hashCode.Value); } int h = 0; for (int i = 0; i < m_count; i++) { h = FdbTuple.CombineHashCodes(h, comparer.GetHashCode(m_slices[i + m_offset])); } if (canUseCache) { m_hashCode = h; } return(h); }
int IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) { // the cached hashcode is only valid for the default comparer! bool canUseCache = object.ReferenceEquals(comparer, SimilarValueComparer.Default); if (m_hashCode.HasValue && canUseCache) { return(m_hashCode.Value); } int h = 0; for (int i = 0; i < m_count; i++) { var item = m_items[i + m_offset]; h = FdbTuple.CombineHashCodes(h, comparer.GetHashCode(item)); } if (canUseCache) { m_hashCode = h; } return(h); }