/// <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()));
     }
 }
예제 #2
0
 /// <summary>
 /// Constructs and return a <see cref="string" /> containing details of the current instance
 /// </summary>
 /// <returns>A <see cref="string" /> containing details of the current instance</returns>
 protected override string PrintF()
 {
     return(References == null || !References.Any()
         ? "no references"
         : References.Aggregate(string.Empty, (current, item) => current = $"{current}, {item.Key}={item.Value}").Substring(2));
 }