/// <summary> /// Calculates the hash code. /// </summary> /// <returns></returns> protected int CalculateHashCode() { unchecked // Overflow is fine, just wrap { var hash = (int)2166136261; hash = (hash * 16777619) ^ Linq.GetHashCode(); hash = (hash * 16777619) ^ Unique.GetHashCode(); hash = References.Aggregate(hash, (current, field) => (current * 16777619) ^ field.GetHashCode()); return(Usings.Aggregate(hash, (current, field) => (current * 16777619) ^ field.GetHashCode())); } }