Exemple #1
0
        public bool Equals(CoreConfig other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(AutoRestart == other.AutoRestart && AutoUpdates == other.AutoUpdates &&
                   EnableConfigWatcher == other.EnableConfigWatcher &&
                   UpdateIntervalInHours == other.UpdateIntervalInHours &&
                   KestrelServer == other.KestrelServer && GPIOSafeMode == other.GPIOSafeMode &&
                   Equals(RelayPins, other.RelayPins) && Equals(IRSensorPins, other.IRSensorPins) &&
                   DisplayStartupMenu == other.DisplayStartupMenu && EnableGpioControl == other.EnableGpioControl &&
                   Debug == other.Debug && EnableFirstChanceLog == other.EnableFirstChanceLog &&
                   EnableTextToSpeech == other.EnableTextToSpeech && MuteAssistant == other.MuteAssistant &&
                   CloseRelayOnShutdown == other.CloseRelayOnShutdown && ServerAuthCode == other.ServerAuthCode &&
                   string.Equals(OwnerEmailAddress, other.OwnerEmailAddress, StringComparison.OrdinalIgnoreCase) &&
                   string.Equals(AssistantEmailId, other.AssistantEmailId, StringComparison.OrdinalIgnoreCase) &&
                   string.Equals(AssistantEmailPassword, other.AssistantEmailPassword, StringComparison.OrdinalIgnoreCase) &&
                   ProgramLastStartup.Equals(other.ProgramLastStartup) &&
                   ProgramLastShutdown.Equals(other.ProgramLastShutdown));
        }
Exemple #2
0
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = AutoRestart.GetHashCode();
         hashCode = (hashCode * 397) ^ AutoUpdates.GetHashCode();
         hashCode = (hashCode * 397) ^ EnableConfigWatcher.GetHashCode();
         hashCode = (hashCode * 397) ^ UpdateIntervalInHours;
         hashCode = (hashCode * 397) ^ KestrelServer.GetHashCode();
         hashCode = (hashCode * 397) ^ GPIOSafeMode.GetHashCode();
         hashCode = (hashCode * 397) ^ (RelayPins != null ? RelayPins.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IRSensorPins != null ? IRSensorPins.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ DisplayStartupMenu.GetHashCode();
         hashCode = (hashCode * 397) ^ EnableGpioControl.GetHashCode();
         hashCode = (hashCode * 397) ^ Debug.GetHashCode();
         hashCode = (hashCode * 397) ^ EnableFirstChanceLog.GetHashCode();
         hashCode = (hashCode * 397) ^ EnableTextToSpeech.GetHashCode();
         hashCode = (hashCode * 397) ^ MuteAssistant.GetHashCode();
         hashCode = (hashCode * 397) ^ CloseRelayOnShutdown.GetHashCode();
         hashCode = (hashCode * 397) ^ ServerAuthCode;
         hashCode = (hashCode * 397) ^ (OwnerEmailAddress != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(OwnerEmailAddress) : 0);
         hashCode = (hashCode * 397) ^ (AssistantEmailId != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(AssistantEmailId) : 0);
         hashCode = (hashCode * 397) ^ (AssistantEmailPassword != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(AssistantEmailPassword) : 0);
         hashCode = (hashCode * 397) ^ ProgramLastStartup.GetHashCode();
         hashCode = (hashCode * 397) ^ ProgramLastShutdown.GetHashCode();
         return(hashCode);
     }
 }