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.
Radarr/NzbDrone.Core/ThingiProvider/ProviderBase.cs

67 lines
1.6 KiB

12 years ago

using FluentValidation.Results;
12 years ago
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Indexers;
12 years ago
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Notifications;
12 years ago
namespace NzbDrone.Core.ThingiProvider
{
public class NotificationProviderRepository : BasicRepository<NotificationDefinition>
12 years ago
{
public NotificationProviderRepository(IDatabase database, IEventAggregator eventAggregator)
12 years ago
: base(database, eventAggregator)
{
}
}
public class IndexerProviderRepository : BasicRepository<IndexerDefinition>
{
public IndexerProviderRepository(IDatabase database, IEventAggregator eventAggregator)
: base(database, eventAggregator)
{
}
12 years ago
}
public abstract class ProviderBase
12 years ago
{
public ProviderDefinition Definition { get; set; }
12 years ago
}
public abstract class ProviderDefinition : ModelBase
12 years ago
{
public string Name { get; set; }
12 years ago
public string Implementation { get; set; }
public string ConfigContract
{
get
{
if (Settings == null) return null;
return Settings.GetType().Name;
}
set
{
}
}
12 years ago
public IProviderConfig Settings { get; set; }
12 years ago
}
public interface IProviderConfig
12 years ago
{
ValidationResult Validate();
}
public class NullSetting : IProviderConfig
{
public static readonly NullSetting Instance = new NullSetting();
public ValidationResult Validate()
{
return new ValidationResult();
}
12 years ago
}
}