Ejemplo n.º 1
0
 void productsReceived(string json)
 {
     if (productListReceivedEvent != null)
     {
         productListReceivedEvent(StoreKitProduct.productsFromJson(json));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// create new instance based on OS. iOS version
 /// </summary>
 public IAPArticle(StoreKitProduct prod)
 {
     id = prod.productIdentifier;
     title = prod.title;
     description = prod.description;
     price = prod.price;
 }
Ejemplo n.º 3
0
 public IAPProduct(StoreKitProduct prod)
 {
     productId    = prod.productIdentifier;
     title        = prod.title;
     price        = prod.price;
     description  = prod.description;
     currencyCode = prod.currencyCode;
 }
Ejemplo n.º 4
0
		public IAPProduct( StoreKitProduct prod )
		{
			productId = prod.productIdentifier;
			title = prod.title;
			price = prod.price;
			description = prod.description;
			currencyCode = prod.currencyCode;
		}
Ejemplo n.º 5
0
        public static StoreKitProduct productFromDictionary( Dictionary<string,object> ht )
        {
            StoreKitProduct product = new StoreKitProduct();

            if( ht.ContainsKey( "productIdentifier" ) )
                product.productIdentifier = ht["productIdentifier"].ToString();

            if( ht.ContainsKey( "localizedTitle" ) )
                product.title = ht["localizedTitle"].ToString();

            if( ht.ContainsKey( "localizedDescription" ) )
                product.description = ht["localizedDescription"].ToString();

            if( ht.ContainsKey( "price" ) )
                product.price = ht["price"].ToString();

            if( ht.ContainsKey( "currencySymbol" ) )
                product.currencySymbol = ht["currencySymbol"].ToString();

            if( ht.ContainsKey( "currencyCode" ) )
                product.currencyCode = ht["currencyCode"].ToString();

            if( ht.ContainsKey( "formattedPrice" ) )
                product.formattedPrice = ht["formattedPrice"].ToString();

            if( ht.ContainsKey( "countryCode" ) )
                product.countryCode = ht["countryCode"].ToString();

            if( ht.ContainsKey( "downloadContentVersion" ) )
                product.downloadContentVersion = ht["downloadContentVersion"].ToString();

            if( ht.ContainsKey( "downloadable" ) )
                product.downloadable = bool.Parse( ht["downloadable"].ToString() );

            if( ht.ContainsKey( "downloadContentLengths" ) && ht["downloadContentLengths"] is IList )
            {
                var tempLengths = ht["downloadContentLengths"] as List<object>;
                foreach( var dlLength in tempLengths )
                    product.downloadContentLengths.Add( System.Convert.ToInt64( dlLength ) );
            }

            return product;
        }
Ejemplo n.º 6
0
        public static StoreKitProduct productFromDictionary(Dictionary <string, object> ht)
        {
            StoreKitProduct product = new StoreKitProduct();

            if (ht.ContainsKey("productIdentifier"))
            {
                product.productIdentifier = ht["productIdentifier"].ToString();
            }

            if (ht.ContainsKey("localizedTitle"))
            {
                product.title = ht["localizedTitle"].ToString();
            }

            if (ht.ContainsKey("localizedDescription"))
            {
                product.description = ht["localizedDescription"].ToString();
            }

            if (ht.ContainsKey("price"))
            {
                product.price = ht["price"].ToString();
            }

            if (ht.ContainsKey("currencySymbol"))
            {
                product.currencySymbol = ht["currencySymbol"].ToString();
            }

            if (ht.ContainsKey("currencyCode"))
            {
                product.currencyCode = ht["currencyCode"].ToString();
            }

            if (ht.ContainsKey("formattedPrice"))
            {
                product.formattedPrice = ht["formattedPrice"].ToString();
            }

            if (ht.ContainsKey("countryCode"))
            {
                product.countryCode = ht["countryCode"].ToString();
            }

            if (ht.ContainsKey("downloadContentVersion"))
            {
                product.downloadContentVersion = ht["downloadContentVersion"].ToString();
            }

            if (ht.ContainsKey("downloadable"))
            {
                product.downloadable = bool.Parse(ht["downloadable"].ToString());
            }

            if (ht.ContainsKey("downloadContentLengths") && ht["downloadContentLengths"] is IList)
            {
                var tempLengths = ht["downloadContentLengths"] as List <object>;
                foreach (var dlLength in tempLengths)
                {
                    product.downloadContentLengths.Add(System.Convert.ToInt64(dlLength));
                }
            }

            return(product);
        }