You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
872 B
31 lines
872 B
using System;
|
|
using Equ;
|
|
using NzbDrone.Core.ThingiProvider;
|
|
using NzbDrone.Core.Validation;
|
|
|
|
namespace NzbDrone.Core.Notifications
|
|
{
|
|
public abstract class NotificationSettingsBase<TSettings> : IProviderConfig, IEquatable<TSettings>
|
|
where TSettings : NotificationSettingsBase<TSettings>
|
|
{
|
|
private static readonly MemberwiseEqualityComparer<TSettings> Comparer = MemberwiseEqualityComparer<TSettings>.ByProperties;
|
|
|
|
public abstract NzbDroneValidationResult Validate();
|
|
|
|
public bool Equals(TSettings other)
|
|
{
|
|
return Comparer.Equals(this as TSettings, other);
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
return Equals(obj as TSettings);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return Comparer.GetHashCode(this as TSettings);
|
|
}
|
|
}
|
|
}
|