From dbadf52029a3c858ef716b8d43acffdf90d2264e Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Tue, 20 Aug 2013 18:32:49 -0700 Subject: [PATCH] removed virtuals from Xem --- .../Providers/XemCommunicationProvider.cs | 19 +++++++++++-------- NzbDrone.Core/Providers/XemProvider.cs | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/NzbDrone.Core/Providers/XemCommunicationProvider.cs b/NzbDrone.Core/Providers/XemCommunicationProvider.cs index ec64c6738..803b74e65 100644 --- a/NzbDrone.Core/Providers/XemCommunicationProvider.cs +++ b/NzbDrone.Core/Providers/XemCommunicationProvider.cs @@ -9,7 +9,14 @@ namespace NzbDrone.Core.Providers { - public class XemCommunicationProvider + public interface IXemCommunicationProvider + { + List GetXemSeriesIds(string origin = "tvdb"); + List GetSceneTvdbMappings(int id); + void CheckForFailureResult(string response); + } + + public class XemCommunicationProvider : IXemCommunicationProvider { private readonly IHttpProvider _httpProvider; @@ -22,11 +29,7 @@ public XemCommunicationProvider(IHttpProvider httpProvider) _httpProvider = httpProvider; } - public XemCommunicationProvider() - { - } - - public virtual List GetXemSeriesIds(string origin = "tvdb") + public List GetXemSeriesIds(string origin = "tvdb") { _logger.Trace("Fetching Series IDs from: {0}", origin); @@ -40,7 +43,7 @@ public virtual List GetXemSeriesIds(string origin = "tvdb") return result.Data.ToList(); } - public virtual List GetSceneTvdbMappings(int id) + public List GetSceneTvdbMappings(int id) { _logger.Trace("Fetching Mappings for: {0}", id); var url = String.Format("{0}all?id={1}&origin=tvdb", XEM_BASE_URL, id); @@ -53,7 +56,7 @@ public virtual List GetSceneTvdbMappings(int id) return result; } - public virtual void CheckForFailureResult(string response) + public void CheckForFailureResult(string response) { var result = JsonConvert.DeserializeObject>(response); diff --git a/NzbDrone.Core/Providers/XemProvider.cs b/NzbDrone.Core/Providers/XemProvider.cs index 449cbeee9..0881f4edc 100644 --- a/NzbDrone.Core/Providers/XemProvider.cs +++ b/NzbDrone.Core/Providers/XemProvider.cs @@ -18,12 +18,12 @@ public interface IXemProvider public class XemProvider : IXemProvider, IExecute, IHandle { private readonly IEpisodeService _episodeService; - private readonly XemCommunicationProvider _xemCommunicationProvider; + private readonly IXemCommunicationProvider _xemCommunicationProvider; private readonly ISeriesService _seriesService; private static readonly Logger _logger = LogManager.GetCurrentClassLogger(); - public XemProvider(IEpisodeService episodeService, XemCommunicationProvider xemCommunicationProvider, ISeriesService seriesService) + public XemProvider(IEpisodeService episodeService, IXemCommunicationProvider xemCommunicationProvider, ISeriesService seriesService) { if (seriesService == null) throw new ArgumentNullException("seriesService"); _episodeService = episodeService;