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