Closed leekelleher closed 8 years ago
Yeah, in my mind that should return true. I'll double check against the tests etc to make sure your fix doesn't have any unforseen side effects.
Thanks @JimBobSquarePants!
This came about when I was reviewing a Merchello/Ditto workshop implementation. Merchello has an IProductContent
which derives from IPublishedContent
, which "should" play nicely with Ditto, but it wasn't. :blush:
The other unit-tests all pass, which either means the patch is cool... or we're missing test scenarios :wink: (gotta test 'em all!)
@JimBobSquarePants No pressure, just curious if you've had chance to look this one?
Sorry... Yeah, looks good to me!
Cool, merged in!
Hey @JimBobSquarePants, here's one for you :smirk_cat:
Whilst experimenting with returning collections of a custom
IPublishedContent
class, Ditto wouldn't attempt to cast/map them any further.I set up a quick unit-test to see if this was the case... (where
PublishedContentMock
is a custom implementation ofIPublishedContent
)Should this be true or false?
I've added in a fix that swaps around the params for the
IsAssignableFrom
check.