示例#1
0
        public IProductListing GetProductInfo(string name)
        {
            var res = new ProductListingImpl
            {
                FormattedPrice = "3.99$",
                Name           = name,
                ProductId      = name + " ID"
            };

            return(res);
        }
示例#2
0
        public IProductListing GetProductInfo(string name)
        {
            try
            {
                var listing = _listing.ProductListings[name];
                var res     = new ProductListingImpl
                {
                    ProductId      = listing.ProductId,
                    Name           = listing.Name,
                    FormattedPrice = listing.FormattedPrice
                };

                return(res);
            }
            catch (Exception)
            {
                return(null);
                //rootPage.NotifyUser("LoadListingInformationAsync API call failed", NotifyType.ErrorMessage);
            }
        }