Beispiel #1
0
            public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
                                            JsonSerializer serializer)
            {
                CurrencyWallet currencyWallet;

                if (existingValue != null)
                {
                    currencyWallet = (CurrencyWallet)existingValue;
                }
                else
                {
                    currencyWallet = new CurrencyWallet();
                }

                CurrencyWallet currencyWallet2 = currencyWallet;

                serializer.Populate(reader, currencyWallet2.Data);
                return(currencyWallet2);
            }
Beispiel #2
0
            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
                CurrencyWallet currencyWallet = (CurrencyWallet)value;

                serializer.Serialize(writer, currencyWallet.Data);
            }