示例#1
0
 /// <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));
 }
示例#2
0
        /// <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));
        }
示例#3
0
 /// <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));
 }