private void InitializeFromDict(Dictionary <string, object> dict) { /* * foreach(KeyValuePair<string, object> p in dict) { * Debug.Log(p.Key + " : " + p.Value); //Just help. * } */ iid = (dict.ContainsKey(JsonKey_Iid)) ? Dataspin.getInt(dict[JsonKey_Iid]) : -1; internal_id = (dict.ContainsKey(JsonKey_InternalName)) ? (string)dict[JsonKey_InternalName] : null; _name = (dict.ContainsKey(JsonKey_Name)) ? (string)dict[JsonKey_Name] : null; price = (dict.ContainsKey(JsonKey_Price)) ? Dataspin.getInt(dict[JsonKey_Price]) : -1; campaign_id = (dict.ContainsKey(JsonKey_CampaignId)) ? Dataspin.getInt(dict[JsonKey_CampaignId]) : -1; purchase_date = (dict.ContainsKey(JsonKey_PurchaseDate)) ? (string)dict[JsonKey_Name] : null; coinsAdded = (dict.ContainsKey(JsonKey_CoinsAdded)) ? Dataspin.getInt(dict[JsonKey_Name]) : -1; coinsAdded_B = (dict.ContainsKey(JsonKey_CoinsAddedB)) ? Dataspin.getInt(dict[JsonKey_Name]) : -1; amount = (dict.ContainsKey(JsonKey_Amount)) ? Dataspin.getInt(dict[JsonKey_Name]) : -1; }
private void InitializeFromDict(Dictionary <string, object> dict) { /* * foreach(KeyValuePair<string, object> p in dict) { * Debug.Log(p.Key + " : " + p.Value); //Just help. * } */ iid = (dict.ContainsKey(JsonKey_Iid)) ? (int)(long)dict[JsonKey_Iid] : -1; internal_id = (dict.ContainsKey(JsonKey_InternalName)) ? (string)dict[JsonKey_InternalName] : null; state = (dict.ContainsKey(JsonKey_State)) ? (string)dict[JsonKey_State] : null; name = (dict.ContainsKey(JsonKey_Name)) ? (string)dict[JsonKey_Name] : null; v_from = (dict.ContainsKey(JsonKey_ValidFrom)) ? (string)dict[JsonKey_ValidFrom] : null; v_to = (dict.ContainsKey(JsonKey_ValidTo)) ? (string)dict[JsonKey_ValidTo] : null; max_amount = (dict.ContainsKey(JsonKey_MaxAmount)) ? Dataspin.getInt(dict[JsonKey_MaxAmount]) : -1; regular_price = (dict.ContainsKey(JsonKey_RegularPrice)) ? Dataspin.getInt(dict[JsonKey_RegularPrice]) : -1; price = (dict.ContainsKey(JsonKey_Price)) ? Dataspin.getInt(dict[JsonKey_Price]) : -1; usd_value = (dict.ContainsKey(JsonKey_USDValue)) ? Dataspin.getDouble(dict[JsonKey_USDValue]) : -1; is_in_B_currency = (dict.ContainsKey(JsonKey_IsBCurrency)) ? Dataspin.getInt(dict[JsonKey_IsBCurrency]) : -1; campaign_id = (dict.ContainsKey(JsonKey_CampaignId)) ? Dataspin.getInt(dict[JsonKey_CampaignId]) : -1; campaign_name = (dict.ContainsKey(JsonKey_CampaignName)) ? (string)dict[JsonKey_CampaignName] : null; type = (dict.ContainsKey(JsonKey_Type)) ? Dataspin.getInt(dict[JsonKey_Type]) : -1; }