예제 #1
0
        public async Task LoadFeaturedAsync()
        {
            try
            {
                WeakReferenceMessenger.Default.Send(new PageLoadingMessage(true));

                var page = await StorefrontApi.GetHomeRecommendations();

                var featured = await FSApi.GetHomePageFeaturedAsync(Windows.ApplicationModel.Package.Current.Id.Version.ToVersion());

                CarouselItems.Clear();

                for (int i = 0; i < featured.Carousel.Count; i++)
                {
                    try
                    {
                        Urn packageUrn = Urn.Parse(featured.Carousel[i]);
                        var package    = await PackageService.GetPackageAsync(packageUrn);

                        CarouselItems.Add(new PackageViewModel(package));
                        if (i == 0)
                        {
                            SelectedCarouselItemIndex = i;
                        }
                    }
                    catch (Flurl.Http.FlurlHttpException)
                    {
                        // Ignore packages that couldn't be resolved
                    }
                }

                // Load featured packages from other sources
                FeaturedPackages = new ObservableCollection <HandlerPackageListPair>();
                await foreach (HandlerPackageListPair pair in PackageService.GetFeaturedPackagesAsync())
                {
                    FeaturedPackages.Add(pair);
                }
            }
            catch (Flurl.Http.FlurlHttpException ex)
            {
                NavService.ShowHttpErrorPage(ex);
            }
            catch (System.Exception ex)
            {
                var logger = Ioc.Default.GetRequiredService <LoggerService>();
                logger.Warn(ex, ex.Message);
            }

            WeakReferenceMessenger.Default.Send(new PageLoadingMessage(false));
        }
예제 #2
0
        public async Task LoadFeaturedAsync()
        {
            var culture = CultureInfo.CurrentUICulture;
            var region  = new RegionInfo(culture.LCID);

            var featured = await FSApi.GetHomePageFeaturedAsync();

            CarouselItems.Clear();

            for (int i = 0; i < featured.Carousel.Count; i++)
            {
                string productId = featured.Carousel[i];
                var    product   = (await StorefrontApi.GetProduct(productId, region.TwoLetterISORegionName, culture.Name))
                                   .Convert <ProductDetails>().Payload;
                CarouselItems.Add(new ProductDetailsViewModel(product));
                if (i == 0 || (i == 1 && featured.Carousel.Count >= 3))
                {
                    SelectedCarouselItemIndex = i;
                }
            }
        }
 public static void UpdateEmailCampaignFolderCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
 public static void ReleaseEmailCommseqStepWaitingCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #5
0
 public static void GetScreenRecordingSegmentCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #6
0
 public static void SearchEmailSegmentCustomersCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #7
0
 public static void GetCountriesCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #8
0
 public static void SendPostcardTestCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #9
0
 public static void BackPopulateEmailFlowCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
 public static void GetTransactionEmailScreenshotsCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #11
0
 public static void code_library_postCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
 public static void GetLibraryItemPublishedVersionsCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #13
0
 public static void GetEmailDashboardActivityCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #14
0
 public static void GetEmailCommseqPostcardStatsCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #15
0
 public static void ArchiveEmailListCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #16
0
 public static void DuplicateLibraryItemCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
 public static void GetEmailCustomerEditorUrlCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #18
0
 public static void SearchPublishedItemsCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #19
0
 public static void DeleteExperimentCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
 public static void ImportEmailThirdPartyProviderListCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
 public static void PrepareDownloadEmailSegmentCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }
예제 #22
0
 public static void CreateEmailSendingDomainCall()
 {
     const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
     var          api       = new StorefrontApi(simpleKey);
 }