Exemple #1
0
 public static void ShowAndReloadStickers(long stickerId, string referrer)
 {
     StickersPackView.ShowWithLoader(referrer, (Action <Action <BackendResult <StockItem, ResultCode> >, CancellationToken>)((callback, cancellationToken) => StoreService.Instance.GetStockItemByStickerId(stickerId, (Action <BackendResult <StockItem, ResultCode> >)(result =>
     {
         if (result.ResultCode == ResultCode.Succeeded)
         {
             StockItem resultData      = result.ResultData;
             StoreProduct storeProduct = resultData != null ? resultData.product :  null;
             if (storeProduct != null && storeProduct.purchased == 1 && storeProduct.active == 1)
             {
                 EventAggregator.Current.Publish(new StickersUpdatedEvent(new StockItemHeader(resultData, false, 0, false)));
             }
         }
         Action <BackendResult <StockItem, ResultCode> > action = callback;
         if (action == null)
         {
             return;
         }
         BackendResult <StockItem, ResultCode> backendResult = result;
         action(backendResult);
     }), new CancellationToken?(cancellationToken))), 0, false);
 }
Exemple #2
0
 public static void Show(string stickersPackName, string referrer)
 {
     StickersPackView.ShowWithLoader(referrer, (Action <Action <BackendResult <StockItem, ResultCode> >, CancellationToken>)((callback, cancellationToken) => StoreService.Instance.GetStockItemByName(stickersPackName, callback, new CancellationToken?(cancellationToken))), 0, false);
 }