Esempio n. 1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <remarks>
 /// It is illegal for a file to have both a rewrite count of 0 AND 1 in the graph.
 /// Therefore we will give both the same hash value as there shouldn't be many collisions, only to report errors.
 /// Furthermore we expect the rewrites > 1 to be limited and eliminated over time. We will use the higher-order bits,
 /// One strategy would be to reverse the bits on the rewrite count and bitwise or it with the absolute path so collisions
 /// would only occur when there are tons of files or high rewrite counts.
 /// </remarks>
 /// <returns>
 /// A hash code for the current object.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     // see remarks on why it is implemented this way.
     return(Value.GetHashCode());
 }
Esempio n. 2
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(StringId.GetHashCode());
 }
Esempio n. 3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(Value.GetHashCode());
 }