Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Ditto 0.8.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@leekelleher leekelleher released this 21 Aug 11:10
· 427 commits to master since this release

Hey there Ditto fans! We are proud to announce the release of Ditto v0.8.0!

Brace yourself, there are a bunch of breaking changes... apologies for any pain caused, ultimately we think they make for a better developer experience!


Bug fixes

  • #80 Made invalid constructor parameters error message more descriptive.
  • #101 Fixed issue when calling .As<IPublishedContent> causes error, when it should just return the current IPublishedContent.

New features

  • #83 Added UmbracoProperties class attribute to allow you to set an Umbraco property Prefix and/or Recursive flag for the whole model.
  • #87 Added ability to populate an existing object.
  • #86 Added DittoOnConverting / DittoOnConverted method attributes to allow custom logic to be run on the model before / after conversion.
  • #86 Added DittoConversionHandler class attributes to allow before / after conversion logic to be encapsulated in custom classes rather than on the model.
  • #86 Added recursive mapping support if resolved values are IPublishedContent or IEnumerable<IPublishedContent>.
  • #79 Added CurrentContentAsAttribute value resolver to allow remapping of current content to a sub model.
  • #95 Added value resolver context support to allow passing in runtime contextual information to value resolvers (e.g. querystring parameters, etc).
  • 72250be Added generic DittoValueResolverAttribute to allow registering simple value resolvers that don't require an attribute for configuration.
  • #99 Added global conversion handler / value resolver / type converter registry, accessible from root Ditto façade.
  • #104 Property lookups (on IPublishedContent members) are now case insensitive.

Breaking Changes

  • #86 Removed EventHandlers (Use conversion handlers instead.)
  • #86 Changed .As converting/converted callbacks to use DittoConversionHandlerContext.
  • #86 Changed .As method signatures, parameters have been reordered based on usage.
  • #86 Changed value resolver class signature, now no need for method parameters or specific constructor signatures.
  • c4252bb Removed docTypeAlias param for IEnumerable .As calls as it was being used as a pre-filter which is not of Ditto concern and so should be done prior to calling Ditto .As.

Documentation


Enjoy the release!

All the best from @mattbrailsford, @leekelleher and @JimBobSquarePants