Beispiel #1
0
        public async Task <StoreApp> GetAppDetailsAsync(AppQueryParameters appQueryParameters)
        {
            var app = (await RemoteUserService.GetAppDetailAsync(appQueryParameters.GetAppQueryParametersDC())).GetStoreApp();

            this.Close();
            return(app);
        }
Beispiel #2
0
 public Dictionary <string, IEnumerable <Dictionary <string, object> > > Query(
     string name,
     AppQueryParameters more,
     bool includeGuid = false,
     string stream    = null,
     int?appId        = null
     ) => HttpContext.RequestServices.Build <AppQuery>().Init(Log).Query(appId, name, includeGuid, stream, more);
Beispiel #3
0
 public Dictionary <string, IEnumerable <Dictionary <string, object> > > Query(
     [FromRoute] string name,
     AppQueryParameters more,
     [FromQuery] bool includeGuid = false,
     [FromQuery] string stream    = null,
     [FromQuery] int?appId        = null
     ) => _appQuery.Value.Init(Log).Query(appId, name, includeGuid, stream, more);
Beispiel #4
0
        public async Task <IEnumerable <StoreApp> > GetRandomAppsAsync(AppQueryParameters appQueryParameters)
        {
            var appsDC = await RemoteUserService.GetRandomAppsAsync(appQueryParameters.GetAppQueryParametersDC());

            var apps = appsDC.Select(appDC => appDC.GetStoreApp()).ToList();

            foreach (var app in apps)
            {
                app.Icon128x128 = await app.Icon128x128Bytes.ConvertToBitmapImageAsync();
            }
            this.Close();
            return(apps);
        }
Beispiel #5
0
        public async Task LoadTopGamesAsync()
        {
            IEnumerable <StoreApp> apps = null;
            var queryParams             = AppQueryParameters.TopGames(0, 1);
            var i = TopGames.Count;

            do
            {
                queryParams.PageIndex = i;
                apps = await AppManager.Instance.GetAppsAsync(queryParams);

                apps.ForEach(app => TopGames.Add(app));
                RaisePropertyChanged(nameof(ShowTopGamesSection));
                i++;
            } while (i < 5 && apps.Count() > 0);
        }
 public static AppFilterDataContract GetAppQueryParametersDC(this AppQueryParameters appQueryParams)
 {
     return new AppFilterDataContract()
     {
         AppCategoryId = appQueryParams.AppCategoryId,
         AppPricing = (WindowsStore.Client.User.Service.UserService.AppPricing?)appQueryParams.AppPricing,
         AppType = (WindowsStore.Client.User.Service.UserService.AppType?)appQueryParams.AppType,
         AppOrderMethod = (WindowsStore.Client.User.Service.UserService.AppOrderMethod?)appQueryParams.AppOrderMethod,
         PageIndex = appQueryParams.PageIndex,
         PageSize = appQueryParams.PageSize,
         Include128X128Icon = appQueryParams.Include128x128Icon,
         Include256X256Icon = appQueryParams.Include256x256Icon,
         AppId = appQueryParams.AppId,
         AppGuid = appQueryParams.AppGuid,
         FeaturedApp = appQueryParams.FeaturedApp
     };
 }
Beispiel #7
0
        public async Task LoadFeaturedAppsAsync()
        {
            var apps = await AppManager.Instance.GetAppsAsync(AppQueryParameters.FeaturedApps());

            apps.ForEach(async app =>
            {
                FeaturedApps.Add(app);
                try
                {
                    app.BackgroundImage = await AppManager.Instance.GetAppBackgroundImageAsync(app.Guid);
                    RaisePropertyChanged(nameof(FeaturedApps));
                    View.SetFlipViewHeight();
                }
                catch
                {
                }
            });
        }
Beispiel #8
0
 public Dictionary <string, IEnumerable <Dictionary <string, object> > > PublicQuery(
     string appPath,
     string name,
     AppQueryParameters more,
     [FromQuery] string stream = null
     ) => HttpContext.RequestServices.Build <AppQuery>().Init(Log).PublicQuery(appPath, name, stream, more);
Beispiel #9
0
 private void showAllTopGamesHyperLink_Click(object sender, RoutedEventArgs e)
 {
     Frame.Navigate(typeof(CatalogPage), AppQueryParameters.TopFreeGames());
 }
Beispiel #10
0
 private void goToGamesPageButton_Click(object sender, RoutedEventArgs e)
 {
     splitView.IsPaneOpen = false;
     subPageFrame.Navigate(typeof(CatalogPage), AppQueryParameters.TopFreeGames());
 }
Beispiel #11
0
 [AllowAnonymous] // will check security internally, so assume no requirements
 public Dictionary <string, IEnumerable <Dictionary <string, object> > > PublicQuery(
     [FromUri] string appPath,
     [FromUri] string name,
     [FromBody] AppQueryParameters more,
     [FromUri] string stream = null
     ) => GetService <AppQuery>().Init(Log).PublicQuery(appPath, name, stream, more);
Beispiel #12
0
 [AllowAnonymous] // will check security internally, so assume no requirements
 public Dictionary <string, IEnumerable <Dictionary <string, object> > > Query([FromUri] string name,
                                                                               [FromBody] AppQueryParameters more,
                                                                               [FromUri] bool includeGuid = false,
                                                                               [FromUri] string stream    = null,
                                                                               [FromUri] int?appId        = null
                                                                               ) => GetService <AppQuery>().Init(Log).Query(appId, name, includeGuid, stream, more);
Beispiel #13
0
 public Dictionary <string, IEnumerable <Dictionary <string, object> > > PublicQuery(
     [FromRoute] string appPath,
     [FromRoute] string name,
     AppQueryParameters more,
     [FromQuery] string stream = null
     ) => _appQuery.Value.Init(Log).PublicQuery(appPath, name, stream, more);
Beispiel #14
0
 public async Task <IEnumerable <StoreApp> > GetRandomAppsAsync(AppQueryParameters appQueryParameters)
 {
     return(await _userService.GetRandomAppsAsync(appQueryParameters));
 }