/// <summary> /// Parses the given <see cref="FeedType"/> and returns a <see cref="IList&lt;Item&gt;"/>. /// </summary> /// <returns></returns> public IList<RssItem> Parse(string url, RssFeedType feedType) { switch (feedType) { case RssFeedType.RSS: return ParseRss(url, false); default: throw new NotSupportedException(string.Format("{0} is not supported", feedType.ToString())); } }
public static IFileDownloadService ResolveFileDownloadService(RssFeedType type, IServiceResolver resolver) { switch (type) { case RssFeedType.Youtube: return(resolver.Resolve <YoutubeFileService>()); default: return(resolver.Resolve <HttpFileDownloadService>()); } }
/// <summary> /// Parses the given <see cref="FeedType"/> and returns a <see cref="IList&lt;Item&gt;"/>. /// </summary> /// <returns></returns> public IList <RssItem> Parse(string url, RssFeedType feedType) { switch (feedType) { case RssFeedType.RSS: return(ParseRss(url, false)); default: throw new NotSupportedException(string.Format("{0} is not supported", feedType.ToString())); } }
public static IFeedReader ResolveFeedReadeer(RssFeedType type, IServiceResolver resolver) { switch (type) { case RssFeedType.Youtube: return(resolver.Resolve <YoutubeFeedReader>()); case RssFeedType.ITunes: return(resolver.Resolve <ITunesFeedReader>()); default: throw new ArgumentException(); } }