Exemple #1
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Venue != null)
                {
                    hash = hash * 59 + Venue.GetHashCode();
                }

                if (SettledTime != null)
                {
                    hash = hash * 59 + SettledTime.GetHashCode();
                }

                if (Timezone != null)
                {
                    hash = hash * 59 + Timezone.GetHashCode();
                }

                if (EachWayDivisor != null)
                {
                    hash = hash * 59 + EachWayDivisor.GetHashCode();
                }

                if (Regulators != null)
                {
                    hash = hash * 59 + Regulators.GetHashCode();
                }

                if (MarketType != null)
                {
                    hash = hash * 59 + MarketType.GetHashCode();
                }

                if (MarketBaseRate != null)
                {
                    hash = hash * 59 + MarketBaseRate.GetHashCode();
                }

                if (NumberOfWinners != null)
                {
                    hash = hash * 59 + NumberOfWinners.GetHashCode();
                }

                if (CountryCode != null)
                {
                    hash = hash * 59 + CountryCode.GetHashCode();
                }

                if (InPlay != null)
                {
                    hash = hash * 59 + InPlay.GetHashCode();
                }

                if (BetDelay != null)
                {
                    hash = hash * 59 + BetDelay.GetHashCode();
                }

                if (BspMarket != null)
                {
                    hash = hash * 59 + BspMarket.GetHashCode();
                }

                if (BettingType != null)
                {
                    hash = hash * 59 + BettingType.GetHashCode();
                }

                if (NumberOfActiveRunners != null)
                {
                    hash = hash * 59 + NumberOfActiveRunners.GetHashCode();
                }

                if (EventId != null)
                {
                    hash = hash * 59 + EventId.GetHashCode();
                }

                if (CrossMatching != null)
                {
                    hash = hash * 59 + CrossMatching.GetHashCode();
                }

                if (RunnersVoidable != null)
                {
                    hash = hash * 59 + RunnersVoidable.GetHashCode();
                }

                if (TurnInPlayEnabled != null)
                {
                    hash = hash * 59 + TurnInPlayEnabled.GetHashCode();
                }

                if (SuspendTime != null)
                {
                    hash = hash * 59 + SuspendTime.GetHashCode();
                }

                if (DiscountAllowed != null)
                {
                    hash = hash * 59 + DiscountAllowed.GetHashCode();
                }

                if (PersistenceEnabled != null)
                {
                    hash = hash * 59 + PersistenceEnabled.GetHashCode();
                }

                if (Runners != null)
                {
                    hash = hash * 59 + Runners.GetHashCode();
                }

                if (Version != null)
                {
                    hash = hash * 59 + Version.GetHashCode();
                }

                if (EventTypeId != null)
                {
                    hash = hash * 59 + EventTypeId.GetHashCode();
                }

                if (Complete != null)
                {
                    hash = hash * 59 + Complete.GetHashCode();
                }

                if (OpenDate != null)
                {
                    hash = hash * 59 + OpenDate.GetHashCode();
                }

                if (MarketTime != null)
                {
                    hash = hash * 59 + MarketTime.GetHashCode();
                }

                if (BspReconciled != null)
                {
                    hash = hash * 59 + BspReconciled.GetHashCode();
                }

                if (Status != null)
                {
                    hash = hash * 59 + Status.GetHashCode();
                }

                return(hash);
            }
        }
Exemple #2
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 (ServiceRanking != null)
         {
             hashCode = hashCode * 59 + ServiceRanking.GetHashCode();
         }
         if (GlobalSize != null)
         {
             hashCode = hashCode * 59 + GlobalSize.GetHashCode();
         }
         if (MaxDiskUsage != null)
         {
             hashCode = hashCode * 59 + MaxDiskUsage.GetHashCode();
         }
         if (PersistenceEnabled != null)
         {
             hashCode = hashCode * 59 + PersistenceEnabled.GetHashCode();
         }
         if (ThreadPoolMaxSize != null)
         {
             hashCode = hashCode * 59 + ThreadPoolMaxSize.GetHashCode();
         }
         if (ScheduledThreadPoolMaxSize != null)
         {
             hashCode = hashCode * 59 + ScheduledThreadPoolMaxSize.GetHashCode();
         }
         if (GracefulShutdownTimeout != null)
         {
             hashCode = hashCode * 59 + GracefulShutdownTimeout.GetHashCode();
         }
         if (Queues != null)
         {
             hashCode = hashCode * 59 + Queues.GetHashCode();
         }
         if (Topics != null)
         {
             hashCode = hashCode * 59 + Topics.GetHashCode();
         }
         if (AddressesMaxDeliveryAttempts != null)
         {
             hashCode = hashCode * 59 + AddressesMaxDeliveryAttempts.GetHashCode();
         }
         if (AddressesExpiryDelay != null)
         {
             hashCode = hashCode * 59 + AddressesExpiryDelay.GetHashCode();
         }
         if (AddressesAddressFullMessagePolicy != null)
         {
             hashCode = hashCode * 59 + AddressesAddressFullMessagePolicy.GetHashCode();
         }
         if (AddressesMaxSizeBytes != null)
         {
             hashCode = hashCode * 59 + AddressesMaxSizeBytes.GetHashCode();
         }
         if (AddressesPageSizeBytes != null)
         {
             hashCode = hashCode * 59 + AddressesPageSizeBytes.GetHashCode();
         }
         if (AddressesPageCacheMaxSize != null)
         {
             hashCode = hashCode * 59 + AddressesPageCacheMaxSize.GetHashCode();
         }
         if (ClusterUser != null)
         {
             hashCode = hashCode * 59 + ClusterUser.GetHashCode();
         }
         if (ClusterPassword != null)
         {
             hashCode = hashCode * 59 + ClusterPassword.GetHashCode();
         }
         if (ClusterCallTimeout != null)
         {
             hashCode = hashCode * 59 + ClusterCallTimeout.GetHashCode();
         }
         if (ClusterCallFailoverTimeout != null)
         {
             hashCode = hashCode * 59 + ClusterCallFailoverTimeout.GetHashCode();
         }
         if (ClusterClientFailureCheckPeriod != null)
         {
             hashCode = hashCode * 59 + ClusterClientFailureCheckPeriod.GetHashCode();
         }
         if (ClusterNotificationAttempts != null)
         {
             hashCode = hashCode * 59 + ClusterNotificationAttempts.GetHashCode();
         }
         if (ClusterNotificationInterval != null)
         {
             hashCode = hashCode * 59 + ClusterNotificationInterval.GetHashCode();
         }
         if (IdCacheSize != null)
         {
             hashCode = hashCode * 59 + IdCacheSize.GetHashCode();
         }
         if (ClusterConfirmationWindowSize != null)
         {
             hashCode = hashCode * 59 + ClusterConfirmationWindowSize.GetHashCode();
         }
         if (ClusterConnectionTtl != null)
         {
             hashCode = hashCode * 59 + ClusterConnectionTtl.GetHashCode();
         }
         if (ClusterDuplicateDetection != null)
         {
             hashCode = hashCode * 59 + ClusterDuplicateDetection.GetHashCode();
         }
         if (ClusterInitialConnectAttempts != null)
         {
             hashCode = hashCode * 59 + ClusterInitialConnectAttempts.GetHashCode();
         }
         if (ClusterMaxRetryInterval != null)
         {
             hashCode = hashCode * 59 + ClusterMaxRetryInterval.GetHashCode();
         }
         if (ClusterMinLargeMessageSize != null)
         {
             hashCode = hashCode * 59 + ClusterMinLargeMessageSize.GetHashCode();
         }
         if (ClusterProducerWindowSize != null)
         {
             hashCode = hashCode * 59 + ClusterProducerWindowSize.GetHashCode();
         }
         if (ClusterReconnectAttempts != null)
         {
             hashCode = hashCode * 59 + ClusterReconnectAttempts.GetHashCode();
         }
         if (ClusterRetryInterval != null)
         {
             hashCode = hashCode * 59 + ClusterRetryInterval.GetHashCode();
         }
         if (ClusterRetryIntervalMultiplier != null)
         {
             hashCode = hashCode * 59 + ClusterRetryIntervalMultiplier.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #3
0
        /// <summary>
        ///     Returns true if MarketDefinition instances are equal
        /// </summary>
        /// <param name="other">Instance of MarketDefinition to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MarketDefinition other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return((Venue == other.Venue || Venue != null && Venue.Equals(other.Venue)) &&
                   (SettledTime == other.SettledTime || SettledTime != null && SettledTime.Equals(other.SettledTime)) &&
                   (Timezone == other.Timezone || Timezone != null && Timezone.Equals(other.Timezone)) &&
                   (EachWayDivisor == other.EachWayDivisor || EachWayDivisor != null && EachWayDivisor.Equals(other.EachWayDivisor)) &&
                   (Regulators == other.Regulators || Regulators != null && Regulators.SequenceEqual(other.Regulators)) &&
                   (MarketType == other.MarketType || MarketType != null && MarketType.Equals(other.MarketType)) &&
                   (MarketBaseRate == other.MarketBaseRate || MarketBaseRate != null && MarketBaseRate.Equals(other.MarketBaseRate)) &&
                   (NumberOfWinners == other.NumberOfWinners || NumberOfWinners != null && NumberOfWinners.Equals(other.NumberOfWinners)) &&
                   (CountryCode == other.CountryCode || CountryCode != null && CountryCode.Equals(other.CountryCode)) &&
                   (InPlay == other.InPlay || InPlay != null && InPlay.Equals(other.InPlay)) &&
                   (BetDelay == other.BetDelay || BetDelay != null && BetDelay.Equals(other.BetDelay)) &&
                   (BspMarket == other.BspMarket || BspMarket != null && BspMarket.Equals(other.BspMarket)) &&
                   (BettingType == other.BettingType || BettingType != null && BettingType.Equals(other.BettingType)) &&
                   (NumberOfActiveRunners == other.NumberOfActiveRunners || NumberOfActiveRunners != null && NumberOfActiveRunners.Equals(other.NumberOfActiveRunners)) &&
                   (EventId == other.EventId || EventId != null && EventId.Equals(other.EventId)) &&
                   (CrossMatching == other.CrossMatching || CrossMatching != null && CrossMatching.Equals(other.CrossMatching)) &&
                   (RunnersVoidable == other.RunnersVoidable || RunnersVoidable != null && RunnersVoidable.Equals(other.RunnersVoidable)) &&
                   (TurnInPlayEnabled == other.TurnInPlayEnabled || TurnInPlayEnabled != null && TurnInPlayEnabled.Equals(other.TurnInPlayEnabled)) &&
                   (SuspendTime == other.SuspendTime || SuspendTime != null && SuspendTime.Equals(other.SuspendTime)) &&
                   (DiscountAllowed == other.DiscountAllowed || DiscountAllowed != null && DiscountAllowed.Equals(other.DiscountAllowed)) &&
                   (PersistenceEnabled == other.PersistenceEnabled || PersistenceEnabled != null && PersistenceEnabled.Equals(other.PersistenceEnabled)) &&
                   (Runners == other.Runners || Runners != null && Runners.SequenceEqual(other.Runners)) &&
                   (Version == other.Version || Version != null && Version.Equals(other.Version)) &&
                   (EventTypeId == other.EventTypeId || EventTypeId != null && EventTypeId.Equals(other.EventTypeId)) &&
                   (Complete == other.Complete || Complete != null && Complete.Equals(other.Complete)) &&
                   (OpenDate == other.OpenDate || OpenDate != null && OpenDate.Equals(other.OpenDate)) &&
                   (MarketTime == other.MarketTime || MarketTime != null && MarketTime.Equals(other.MarketTime)) &&
                   (BspReconciled == other.BspReconciled || BspReconciled != null && BspReconciled.Equals(other.BspReconciled)) &&
                   (Status == other.Status || Status != null && Status.Equals(other.Status)));
        }
Exemple #4
0
        /// <summary>
        /// Returns true if ComAdobeCqScreensMqActivemqImplArtemisJMSProviderProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeCqScreensMqActivemqImplArtemisJMSProviderProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeCqScreensMqActivemqImplArtemisJMSProviderProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ServiceRanking == other.ServiceRanking ||
                     ServiceRanking != null &&
                     ServiceRanking.Equals(other.ServiceRanking)
                     ) &&
                 (
                     GlobalSize == other.GlobalSize ||
                     GlobalSize != null &&
                     GlobalSize.Equals(other.GlobalSize)
                 ) &&
                 (
                     MaxDiskUsage == other.MaxDiskUsage ||
                     MaxDiskUsage != null &&
                     MaxDiskUsage.Equals(other.MaxDiskUsage)
                 ) &&
                 (
                     PersistenceEnabled == other.PersistenceEnabled ||
                     PersistenceEnabled != null &&
                     PersistenceEnabled.Equals(other.PersistenceEnabled)
                 ) &&
                 (
                     ThreadPoolMaxSize == other.ThreadPoolMaxSize ||
                     ThreadPoolMaxSize != null &&
                     ThreadPoolMaxSize.Equals(other.ThreadPoolMaxSize)
                 ) &&
                 (
                     ScheduledThreadPoolMaxSize == other.ScheduledThreadPoolMaxSize ||
                     ScheduledThreadPoolMaxSize != null &&
                     ScheduledThreadPoolMaxSize.Equals(other.ScheduledThreadPoolMaxSize)
                 ) &&
                 (
                     GracefulShutdownTimeout == other.GracefulShutdownTimeout ||
                     GracefulShutdownTimeout != null &&
                     GracefulShutdownTimeout.Equals(other.GracefulShutdownTimeout)
                 ) &&
                 (
                     Queues == other.Queues ||
                     Queues != null &&
                     Queues.Equals(other.Queues)
                 ) &&
                 (
                     Topics == other.Topics ||
                     Topics != null &&
                     Topics.Equals(other.Topics)
                 ) &&
                 (
                     AddressesMaxDeliveryAttempts == other.AddressesMaxDeliveryAttempts ||
                     AddressesMaxDeliveryAttempts != null &&
                     AddressesMaxDeliveryAttempts.Equals(other.AddressesMaxDeliveryAttempts)
                 ) &&
                 (
                     AddressesExpiryDelay == other.AddressesExpiryDelay ||
                     AddressesExpiryDelay != null &&
                     AddressesExpiryDelay.Equals(other.AddressesExpiryDelay)
                 ) &&
                 (
                     AddressesAddressFullMessagePolicy == other.AddressesAddressFullMessagePolicy ||
                     AddressesAddressFullMessagePolicy != null &&
                     AddressesAddressFullMessagePolicy.Equals(other.AddressesAddressFullMessagePolicy)
                 ) &&
                 (
                     AddressesMaxSizeBytes == other.AddressesMaxSizeBytes ||
                     AddressesMaxSizeBytes != null &&
                     AddressesMaxSizeBytes.Equals(other.AddressesMaxSizeBytes)
                 ) &&
                 (
                     AddressesPageSizeBytes == other.AddressesPageSizeBytes ||
                     AddressesPageSizeBytes != null &&
                     AddressesPageSizeBytes.Equals(other.AddressesPageSizeBytes)
                 ) &&
                 (
                     AddressesPageCacheMaxSize == other.AddressesPageCacheMaxSize ||
                     AddressesPageCacheMaxSize != null &&
                     AddressesPageCacheMaxSize.Equals(other.AddressesPageCacheMaxSize)
                 ) &&
                 (
                     ClusterUser == other.ClusterUser ||
                     ClusterUser != null &&
                     ClusterUser.Equals(other.ClusterUser)
                 ) &&
                 (
                     ClusterPassword == other.ClusterPassword ||
                     ClusterPassword != null &&
                     ClusterPassword.Equals(other.ClusterPassword)
                 ) &&
                 (
                     ClusterCallTimeout == other.ClusterCallTimeout ||
                     ClusterCallTimeout != null &&
                     ClusterCallTimeout.Equals(other.ClusterCallTimeout)
                 ) &&
                 (
                     ClusterCallFailoverTimeout == other.ClusterCallFailoverTimeout ||
                     ClusterCallFailoverTimeout != null &&
                     ClusterCallFailoverTimeout.Equals(other.ClusterCallFailoverTimeout)
                 ) &&
                 (
                     ClusterClientFailureCheckPeriod == other.ClusterClientFailureCheckPeriod ||
                     ClusterClientFailureCheckPeriod != null &&
                     ClusterClientFailureCheckPeriod.Equals(other.ClusterClientFailureCheckPeriod)
                 ) &&
                 (
                     ClusterNotificationAttempts == other.ClusterNotificationAttempts ||
                     ClusterNotificationAttempts != null &&
                     ClusterNotificationAttempts.Equals(other.ClusterNotificationAttempts)
                 ) &&
                 (
                     ClusterNotificationInterval == other.ClusterNotificationInterval ||
                     ClusterNotificationInterval != null &&
                     ClusterNotificationInterval.Equals(other.ClusterNotificationInterval)
                 ) &&
                 (
                     IdCacheSize == other.IdCacheSize ||
                     IdCacheSize != null &&
                     IdCacheSize.Equals(other.IdCacheSize)
                 ) &&
                 (
                     ClusterConfirmationWindowSize == other.ClusterConfirmationWindowSize ||
                     ClusterConfirmationWindowSize != null &&
                     ClusterConfirmationWindowSize.Equals(other.ClusterConfirmationWindowSize)
                 ) &&
                 (
                     ClusterConnectionTtl == other.ClusterConnectionTtl ||
                     ClusterConnectionTtl != null &&
                     ClusterConnectionTtl.Equals(other.ClusterConnectionTtl)
                 ) &&
                 (
                     ClusterDuplicateDetection == other.ClusterDuplicateDetection ||
                     ClusterDuplicateDetection != null &&
                     ClusterDuplicateDetection.Equals(other.ClusterDuplicateDetection)
                 ) &&
                 (
                     ClusterInitialConnectAttempts == other.ClusterInitialConnectAttempts ||
                     ClusterInitialConnectAttempts != null &&
                     ClusterInitialConnectAttempts.Equals(other.ClusterInitialConnectAttempts)
                 ) &&
                 (
                     ClusterMaxRetryInterval == other.ClusterMaxRetryInterval ||
                     ClusterMaxRetryInterval != null &&
                     ClusterMaxRetryInterval.Equals(other.ClusterMaxRetryInterval)
                 ) &&
                 (
                     ClusterMinLargeMessageSize == other.ClusterMinLargeMessageSize ||
                     ClusterMinLargeMessageSize != null &&
                     ClusterMinLargeMessageSize.Equals(other.ClusterMinLargeMessageSize)
                 ) &&
                 (
                     ClusterProducerWindowSize == other.ClusterProducerWindowSize ||
                     ClusterProducerWindowSize != null &&
                     ClusterProducerWindowSize.Equals(other.ClusterProducerWindowSize)
                 ) &&
                 (
                     ClusterReconnectAttempts == other.ClusterReconnectAttempts ||
                     ClusterReconnectAttempts != null &&
                     ClusterReconnectAttempts.Equals(other.ClusterReconnectAttempts)
                 ) &&
                 (
                     ClusterRetryInterval == other.ClusterRetryInterval ||
                     ClusterRetryInterval != null &&
                     ClusterRetryInterval.Equals(other.ClusterRetryInterval)
                 ) &&
                 (
                     ClusterRetryIntervalMultiplier == other.ClusterRetryIntervalMultiplier ||
                     ClusterRetryIntervalMultiplier != null &&
                     ClusterRetryIntervalMultiplier.Equals(other.ClusterRetryIntervalMultiplier)
                 ));
        }