///handles everything that's IParseable and IFormattable, such as DateTime, TimeSpan, long, int, short
///to avoid one converter per each built-in common type (would be an STJ moment)
class ParseableFormattableConverter : IConverter<TCombination/*???*/>
where TCombination : IFormattable, IParseable<?????>
{
void Serialize(TextWriter w, in TCombination t) => t.ToString(null, null);
void Deserialize(TextReader r, ref TCombination t) => t = ref TCombination.Parse(r.Read()); //more or less
}
///handles everything that's IParseable and IFormattable, such as DateTime, TimeSpan, long, int, short
///to avoid one converter per each built-in common type (would be an STJ moment)
class ParseableFormattableConverter : IConverter<TCombination/*???*/>
where TCombination : IFormattable, IParseable<?????>
{
void Serialize(TextWriter w, in TCombination t) => t.ToString(null, null);
void Deserialize(TextReader r, ref TCombination t) => t = ref TCombination.Parse(r.Read()); //more or less
}