2014-07-04 08:09:48 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using FluentValidation.Results;
|
2013-10-01 17:13:40 +00:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.ThingiProvider
|
|
|
|
|
{
|
|
|
|
|
public interface IProviderFactory<TProvider, TProviderDefinition>
|
|
|
|
|
where TProviderDefinition : ProviderDefinition, new()
|
|
|
|
|
where TProvider : IProvider
|
|
|
|
|
{
|
|
|
|
|
List<TProviderDefinition> All();
|
|
|
|
|
List<TProvider> GetAvailableProviders();
|
|
|
|
|
TProviderDefinition Get(int id);
|
2014-07-04 08:09:48 +00:00
|
|
|
|
TProviderDefinition Create(TProviderDefinition definition);
|
|
|
|
|
void Update(TProviderDefinition definition);
|
2013-10-01 17:13:40 +00:00
|
|
|
|
void Delete(int id);
|
2014-06-19 22:56:49 +00:00
|
|
|
|
IEnumerable<TProviderDefinition> GetDefaultDefinitions();
|
|
|
|
|
IEnumerable<TProviderDefinition> GetPresetDefinitions(TProviderDefinition providerDefinition);
|
2014-07-04 08:09:48 +00:00
|
|
|
|
ValidationResult Test(TProviderDefinition definition);
|
2013-10-01 17:13:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|