The IStringConverterFactory implements methods to look up converters either by AgEntity, or by AgEntity and attribute name. This barely makes sense in the current Agrest. The former always returns a generic converter, and the latter simply does a lookup by attribute type, only with (inefficient) extra steps (concatenating Strings to build cache keys, creating a secondary cache).
So going to remove IStringConverterFactory, and replace it by ValueStringConverters that does lookups by value type.
Additionally ValueEncoders will be refactored to create encoders based on known "value-string" converters instead of duplicating the same converter algorithms in Encoders.
The
IStringConverterFactory
implements methods to look up converters either by AgEntity, or by AgEntity and attribute name. This barely makes sense in the current Agrest. The former always returns a generic converter, and the latter simply does a lookup by attribute type, only with (inefficient) extra steps (concatenating Strings to build cache keys, creating a secondary cache).So going to remove
IStringConverterFactory
, and replace it byValueStringConverters
that does lookups by value type.Additionally
ValueEncoders
will be refactored to create encoders based on known "value-string" converters instead of duplicating the same converter algorithms in Encoders.