/// <summary> /// Overloaded constructor for creating a SpotlightFeedReader with a url and /// dependency injected cache. Mostly for unit testing purposes. /// </summary> /// <param name="url"></param> /// <param name="cache"></param> /// <returns></returns> public static async Task <SpotlightFeedReader> CreateSpotlightFeedReader(string url, IFeedCache <string> cache) { return(await SpotlightFeedReader.CreateAsync(url, cache)); }
/// <summary> /// Create an instance of this object with a url and caching object provided, /// and initialize it asynchronously. /// </summary> /// <param name="url"></param> /// <returns></returns> public static Task <SpotlightFeedReader> CreateAsync(string url, IFeedCache <string> cache) { var reader = new SpotlightFeedReader(url); return(reader.InitializeAsync_(cache)); }
/// <summary> /// Constructor for creating a SpotlightFeedReader with a specified url. The reader /// will attempt to asynchronously fetch and cache the data. /// </summary> /// <param name="url"></param> /// <returns></returns> public static async Task <SpotlightFeedReader> CreateSpotlightFeedReader(string url) { return(await SpotlightFeedReader.CreateAsync(url)); }