invio / Invio.Immutable

C# Library used to ease immutable class creation and data management
MIT License
2 stars 0 forks source link

Create `IStringFormatter` interface to standardize string representations #38

Closed carusology closed 6 years ago

carusology commented 6 years ago

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 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.

carusology commented 6 years ago

Closed via #40