using System; using System.Collections.Generic; using FluentValidation.Results; using NzbDrone.Core.ThingiProvider; using NzbDrone.Core.Tv; namespace NzbDrone.Core.Notifications { public abstract class NotificationBase : INotification where TSettings : IProviderConfig, new() { public abstract string Name { get; } public Type ConfigContract { get { return typeof(TSettings); } } public IEnumerable DefaultDefinitions { get { return new List(); } } public ProviderDefinition Definition { get; set; } public abstract ValidationResult Test(); public abstract string Link { get; } public abstract void OnGrab(string message); public abstract void OnDownload(DownloadMessage message); public abstract void AfterRename(Series series); protected TSettings Settings { get { return (TSettings)Definition.Settings; } } public override string ToString() { return GetType().Name; } } }