public NativeSQLQuerySpecification( string queryString, INativeSQLQueryReturn[] sqlQueryReturns, ICollection <string> querySpaces) { this.queryString = queryString; this.sqlQueryReturns = sqlQueryReturns; this.querySpaces = new HashSet <string>(); if (querySpaces != null) { this.querySpaces.UnionWith(querySpaces); } // pre-determine and cache the hashcode int hCode = queryString.GetHashCode(); unchecked { hCode = 29 * hCode + CollectionHelper.GetHashCode(this.querySpaces, this.querySpaces.Comparer); if (this.sqlQueryReturns != null) { hCode = 29 * hCode + ArrayHelper.ArrayGetHashCode(this.sqlQueryReturns); } } hashCode = hCode; }
public override int GetHashCode() { int result = _tupleLength; result = 31 * result + _tupleSubsetLength; result = 31 * result + (_includeInTuple != null ? ArrayHelper.ArrayGetHashCode(_includeInTuple) : 0); result = 31 * result + (_includeInTransformIndex != null ? ArrayHelper.ArrayGetHashCode(_includeInTransformIndex) : 0); return(result); }
public override int GetHashCode() { if (AutoDiscoverTypes) { return(_autoDiscoveredQuery.GetHashCode()); } var result = _tupleLength; result = 31 * result + _tupleSubsetLength; result = 31 * result + (_includeInTuple != null ? ArrayHelper.ArrayGetHashCode(_includeInTuple) : 0); result = 31 * result + (_includeInTransformIndex != null ? ArrayHelper.ArrayGetHashCode(_includeInTransformIndex) : 0); return(result); }