void productsReceived(string json) { if (productListReceivedEvent != null) { productListReceivedEvent(StoreKitProduct.productsFromJson(json)); } }
/// <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; }
public IAPProduct(StoreKitProduct prod) { productId = prod.productIdentifier; title = prod.title; price = prod.price; description = prod.description; currencyCode = prod.currencyCode; }
public IAPProduct( StoreKitProduct prod ) { productId = prod.productIdentifier; title = prod.title; price = prod.price; description = prod.description; currencyCode = prod.currencyCode; }
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; }
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); }