Exemple #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Symbol != null)
         {
             hashCode = hashCode * 59 + Symbol.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (ExchangeListed != null)
         {
             hashCode = hashCode * 59 + ExchangeListed.GetHashCode();
         }
         if (ExchangeTraded != null)
         {
             hashCode = hashCode * 59 + ExchangeTraded.GetHashCode();
         }
         if (Minmovement != null)
         {
             hashCode = hashCode * 59 + Minmovement.GetHashCode();
         }
         if (Minmov2 != null)
         {
             hashCode = hashCode * 59 + Minmov2.GetHashCode();
         }
         if (Fractional != null)
         {
             hashCode = hashCode * 59 + Fractional.GetHashCode();
         }
         if (Pricescale != null)
         {
             hashCode = hashCode * 59 + Pricescale.GetHashCode();
         }
         if (HasIntraday != null)
         {
             hashCode = hashCode * 59 + HasIntraday.GetHashCode();
         }
         if (HasNoVolume != null)
         {
             hashCode = hashCode * 59 + HasNoVolume.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Ticker != null)
         {
             hashCode = hashCode * 59 + Ticker.GetHashCode();
         }
         if (Timezone != null)
         {
             hashCode = hashCode * 59 + Timezone.GetHashCode();
         }
         if (SessionRegular != null)
         {
             hashCode = hashCode * 59 + SessionRegular.GetHashCode();
         }
         if (SupportedResolutions != null)
         {
             hashCode = hashCode * 59 + SupportedResolutions.GetHashCode();
         }
         if (HasDaily != null)
         {
             hashCode = hashCode * 59 + HasDaily.GetHashCode();
         }
         if (IntradayMultipliers != null)
         {
             hashCode = hashCode * 59 + IntradayMultipliers.GetHashCode();
         }
         if (HasWeeklyAndMonthly != null)
         {
             hashCode = hashCode * 59 + HasWeeklyAndMonthly.GetHashCode();
         }
         return(hashCode);
     }
 }