Whilst I was developing the Archetype/IPublishedContent bridge, I spent time looking at Umbraco's IPublishedProperty... which got me thinking, should Ditto have an IPublishedProperty.As<T>?
Umbraco already enables the use of TypeConverters via the property.GetValue<T> extension method, (it internally calls object.TryConvertTo<T>). This is great, but thinking that using Ditto could introduce ValueResolvers and pre/post ConversionHandlers.
Upfront, this is a bit of an 'out there' idea.
Whilst I was developing the Archetype/IPublishedContent bridge, I spent time looking at Umbraco's
IPublishedProperty
... which got me thinking, should Ditto have anIPublishedProperty.As<T>
?Umbraco already enables the use of TypeConverters via the
property.GetValue<T>
extension method, (it internally callsobject.TryConvertTo<T>
). This is great, but thinking that using Ditto could introduce ValueResolvers and pre/post ConversionHandlers.