As part of #37, we now render IEnumerable as strings in a manner similar to JSON arrays by default. However, the values within those enumerables are rendered using the default ToString() implementation for that type, rather than using what has been determined as the desired way to render that type across a parent ImmutableBase<TImmutable>. This means a DateTime property will have its values rendered one way, but a DateTime value within an IEnumerable will be rendered another way.
Task
Create an IStringFormatter concept that can either be injected into each IPropertyHandler to determine how to render each type as a string, or used directly on ImmutableBase when rendering property values via its ToString() implementation.
Background
As part of #37, we now render
IEnumerable
as strings in a manner similar to JSON arrays by default. However, the values within those enumerables are rendered using the defaultToString()
implementation for that type, rather than using what has been determined as the desired way to render that type across a parentImmutableBase<TImmutable>
. This means aDateTime
property will have its values rendered one way, but aDateTime
value within anIEnumerable
will be rendered another way.Task
Create an
IStringFormatter
concept that can either be injected into eachIPropertyHandler
to determine how to render each type as a string, or used directly onImmutableBase
when rendering property values via itsToString()
implementation.