I'm attaching to the ContentService.Published event because I need to take some action after content is published. I'd like to work with the published items using my strongly typed models. However, in the ContentService.Published event, you are given a collection of IContent and the ConvertToModel extension method expects an IPublishedContent.
I'm thinking about writing another extension method that can take an IContent and do the same thing. Before I do so however, I have two questions:
1) Does this code already exist somewhere and I'm just not seeing it?
2) If not, and I write the code, is this something you'd like to see a Pull Request for?
I'm attaching to the
ContentService.Published
event because I need to take some action after content is published. I'd like to work with the published items using my strongly typed models. However, in theContentService.Published
event, you are given a collection ofIContent
and theConvertToModel
extension method expects anIPublishedContent
.I'm thinking about writing another extension method that can take an
IContent
and do the same thing. Before I do so however, I have two questions:1) Does this code already exist somewhere and I'm just not seeing it? 2) If not, and I write the code, is this something you'd like to see a Pull Request for?
Thanks!