コード例 #1
0
 /// <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));
 }
コード例 #2
0
        /// <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));
        }
コード例 #3
0
 /// <summary>
 /// Overloaded constructor for creating a SpotlightViewModel with the default url.
 /// </summary>
 /// <returns></returns>
 public static async Task <SpotlightViewModel> CreateSpotlightViewModel()
 {
     return(await SpotlightViewModel.CreateAsync());
 }