umco / umbraco-ditto

Ditto - the friendly view-model mapper for Umbraco
http://our.umbraco.org/projects/developer-tools/ditto
MIT License
79 stars 33 forks source link

IPublishedProperty.As<T> #135

Closed leekelleher closed 9 years ago

leekelleher commented 9 years ago

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

leekelleher commented 9 years ago

Closing this, I must have been drunk when posting this! :scream_cat: