Esempio n. 1
0
 public static DecimalStat ToDecimalStat(this Dictionary serialized) =>
 new DecimalStat(
     StatTypeExtension.Deserialize((Binary)serialized["type"]),
     serialized["value"].ToDecimal());
Esempio n. 2
0
 public static IValue Serialize(this DecimalStat decimalStat) =>
 Dictionary.Empty
 .Add("type", StatTypeExtension.Serialize(decimalStat.Type))
 .Add("value", decimalStat.Value.Serialize());