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