public override int GetHashCode() { if (!hashCodeBuilded) { HashCodeBuilder builder = new HashCodeBuilder(); //StructureType builder.Append(StructureType); //descriptor builder.Append(descriptor); //Items for (int i = 0; i < Path.Length; i++) { builder.Append(Path[i]); } hashCode = builder.GetHashCode(); hashCodeBuilded = true; } return(hashCode); }
protected override int GetHashCodeCore(HashCodeBuilder builder) { return(builder.GetHashCode()); }
public static void HashCode_GetHashCode() { var hc = new HashCodeBuilder(); Assert.Throws <NotSupportedException>(() => hc.GetHashCode()); }