public static void LoadTest(uint ageRating, string currentMarket, string description, string formattedPrice, string name, Dictionary<string,ProductListing> products) { #if DEBUG MockIAP.Init(); MockIAP.RunInMockMode(true); MockIAP.SetListingInformation(ageRating, currentMarket, description, formattedPrice, name); foreach (var productListing in products) { var key = productListing.Key; var product = productListing.Value; // Add some more items manually. var p = new MockIAPLib.ProductListing { Name = product.Name, ProductId = product.ProductId, ProductType = (Windows.ApplicationModel.Store.ProductType)product.ProductType, Description = product.Description, FormattedPrice = product.FormattedPrice, Tag = string.Empty }; MockIAP.AddProductListing(key, p); } #endif }
public static void LoadTest(uint ageRating, string currentMarket, string description, string formattedPrice, string name, Dictionary <string, ProductListing> products) { #if DEBUG MockIAP.Init(); MockIAP.RunInMockMode(true); MockIAP.SetListingInformation(ageRating, currentMarket, description, formattedPrice, name); foreach (var productListing in products) { var key = productListing.Key; var product = productListing.Value; // Add some more items manually. var p = new MockIAPLib.ProductListing { Name = product.Name, ProductId = product.ProductId, ProductType = (Windows.ApplicationModel.Store.ProductType)product.ProductType, Description = product.Description, FormattedPrice = product.FormattedPrice, Tag = string.Empty }; MockIAP.AddProductListing(key, p); } #endif }
private void AddMock_LojaParticular() { #if DEBUG MockIAP.Init(); MockIAP.RunInMockMode(true); MockIAP.SetListingInformation(1, "en-US", "Produtos", "1", "LojaInApp"); ProductListing _produto1 = new ProductListing() { Name = "10 pontos", ImageUri = new Uri("Assets/BadgeLogo.png", UriKind.Relative), ProductId = "11111", ProductType = Windows.ApplicationModel.Store.ProductType.Consumable, Keywords = new string[] { "pontos" }, Description = "Ganhe 10 pontos!", FormattedPrice = "1.0", Tag = string.Empty }; MockIAP.AddProductListing("10 pontos", _produto1); ProductListing _produto2 = new ProductListing() { Name = "Armadura", ImageUri = new Uri("Assets/Tiles/IconicTileMediumLarge.png", UriKind.Relative), ProductId = "22222", ProductType = Windows.ApplicationModel.Store.ProductType.Durable, Keywords = new string[] { "equipamento" }, Description = "Ganhe uma armadura!", FormattedPrice = "5.0", Tag = string.Empty }; MockIAP.AddProductListing("Armadura", _produto2); #endif }
private void CriarProdutos() { #if DEBUG MockIAP.Init(); MockIAP.RunInMockMode(true); MockIAP.SetListingInformation(1, "pt-br", "wp.Loja", "1", "Loja"); // Criar um produto consumable ProductListing _produtoCon = new ProductListing() { Name = "25 pontos", ImageUri = new Uri("Assets/Tiles/IconicTileSmall.png", UriKind.Relative), ProductId = "11111", ProductType = Windows.ApplicationModel.Store.ProductType.Consumable, Keywords = new string[] { "pontos" }, Description = "Compre 25 pontos e faça um developer feliz", FormattedPrice = "1.0", Tag = string.Empty }; MockIAP.AddProductListing("25 pontos", _produtoCon); // Criar um produto durable ProductListing _produtoDur = new ProductListing() { Name = "Super blaster", ImageUri = new Uri("Assets/Tiles/IconicTileSmall.png", UriKind.Relative), ProductId = "22222", ProductType = Windows.ApplicationModel.Store.ProductType.Durable, Keywords = new string[] { "pontos" }, Description = "Compre a arma super blaster master revolution...", FormattedPrice = "2.0", Tag = string.Empty }; MockIAP.AddProductListing("Super blaster", _produtoDur); #endif }