-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
Description
TypeFlattener already works quite well for flat structures. Buttwo enhancements are needed:
-
Check if a field is a primitive and keep its value unchanged if it is. Otherwise, check if the type implements
IConvertibleand convert it according to theGetTypeCode()returned value. If notIConvertible, callToString(). Spreads' primitive types must implementIConvertibleor overrideToString()(ToString()override is always needed to avoid boxing). -
Recursive flattening. Need to decide if
IConvertibletakes priority over expanding nested non-primitive types. (some logic with attribute presence or custom attributes could apply).