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

Non-extension methods in extension methods class #131

Closed leekelleher closed 9 years ago

leekelleher commented 9 years ago

Looking over the PublishedContentExtensions class, there are a few methods that aren't really extension methods, so I'm wondering if they really belong in there?

Namely, ConvertContent, GetResolvedValue, GetConvertedValue, OnConverting and OnConverted, (along with the ConcurrentDictionary caches).

I'm not suggesting that we dump them in some helper/utility class, but wondering if there's a better place (architecturally) to have them?

No biggie, just thinking out loud.

JimBobSquarePants commented 9 years ago

Aren't those all called directly by the As<T>() method with no other external method calls? They're very specific to the public extension so I would keep them where they are.

leekelleher commented 9 years ago

Yeah, they're all marked as private and only using for the .As<T> method.

I'm happy to keep them there, was one of those thoughts whilst browsing the codebase.