/// <summary> /// Overload for creating a SpotlightViewModel with a specific url and dependency /// injected reader. Mostly for unit testing purposes. /// </summary> /// <param name="url"></param> /// <returns></returns> public static async Task <SpotlightViewModel> CreateSpotlightViewModel(string url, IFeedReader <SpotlightItemRoot> reader) { return(await SpotlightViewModel.CreateAsync(url, reader)); }
/// <summary> /// Create an instance of this object with a url and reader provided, /// and initialize it asynchronously. /// </summary> /// <param name="url"></param> /// <param name="reader"></param> /// <returns></returns> public static Task <SpotlightViewModel> CreateAsync(string url, IFeedReader <SpotlightItemRoot> reader) { var vm = new SpotlightViewModel(); return(vm.InitializeAsync_(url, reader)); }
/// <summary> /// Overloaded constructor for creating a SpotlightViewModel with the default url. /// </summary> /// <returns></returns> public static async Task <SpotlightViewModel> CreateSpotlightViewModel() { return(await SpotlightViewModel.CreateAsync()); }