public override void RequestProductInformation(string[] productIds, ProductInformationDelegate onSucceed, RequestFailedDelegate onFailed)
        {
            if (productIds == null || productIds.Length == 0)
                throw new ArgumentException("InAppPurchaseManager: At least one product id is required.");

            throw new NotImplementedException();
        }
 public ProductsRequestDelegate(ProductInformationDelegate onSucceed, RequestFailedDelegate onFailed)
 {
     this.onSucceed = onSucceed;
     this.onFailed = onFailed;
 }
 public abstract void RequestProductInformation(string[] productIds, ProductInformationDelegate onSucceed, RequestFailedDelegate onFailed);
        public override void RequestProductInformation(string[] productIds, ProductInformationDelegate onSucceed, RequestFailedDelegate onFailed)
        {
            if (productIds == null || productIds.Length == 0)
                throw new ArgumentException("InAppPurchaseManager: At least one product id is required.");

            try
            {
                var products = new NSString[productIds.Length];
                for (int i = 0; i < productIds.Length; i++)
                {
                    products[i] = new NSString(productIds[i]);
                }
                NSSet productIdentifiers = NSSet.MakeNSObjectSet<NSString>(products);

                if (productsRequestDelegate == null)
                {
                    productsRequestDelegate = new ProductsRequestDelegate(onSucceed, onFailed);
                }

                SKProductsRequest productsRequest = new SKProductsRequest(productIdentifiers);
                productsRequest.Delegate = productsRequestDelegate;
                productsRequest.Start();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                if (onFailed != null)
                {
                    onFailed(new InAppPurchaseException("Error while requesting product information.", 0, ex));
                }
            }
        }
        public virtual void RequestProductInformation(string productId, ProductInformationDelegate onSucceed, RequestFailedDelegate onFailed)
        {
            if (String.IsNullOrWhiteSpace(productId) == true)
                throw new ArgumentException("InAppPurchaseManager: Invalid product id.");

            RequestProductInformation(new string[]{ productId }, onSucceed, onFailed);
        }