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.
Sonarr/src/NzbDrone.Core/Download/DownloadClientProvider.cs

24 lines
617 B

using System.Linq;
12 years ago
namespace NzbDrone.Core.Download
{
public interface IProvideDownloadClient
{
IDownloadClient GetDownloadClient();
}
public class DownloadClientProvider : IProvideDownloadClient
{
private readonly IDownloadClientFactory _downloadClientFactory;
12 years ago
public DownloadClientProvider(IDownloadClientFactory downloadClientFactory)
12 years ago
{
_downloadClientFactory = downloadClientFactory;
12 years ago
}
public IDownloadClient GetDownloadClient()
{
return _downloadClientFactory.Enabled().FirstOrDefault();
12 years ago
}
}
}