Can't subscribe to package/extraction event in 2.11 version
Hi all. I use Umbraco 7.2.1 and now installed last version of Courier(2.11).
To hook packaging items procedure previously, In 2.5 version(for Umbraco 6) I used following approach:
DataTypeProvider.Instance().Packaged += Packaged;
In my Packaged method I skipped data type items that shouldn't be ovewritten on target environment.
In new version of Courier I can't use this approach, cause DataTypeProvider.Instance() doesn't exist. I tried to take DataTypeProvider instance from providers collection ProviderModel.ItemProviderCollection.Instance and subscribe on Packaged event, but it didn't fire.
Can't subscribe to package/extraction event in 2.11 version
Hi all. I use Umbraco 7.2.1 and now installed last version of Courier(2.11).
To hook packaging items procedure previously, In 2.5 version(for Umbraco 6) I used following approach:
DataTypeProvider.Instance().Packaged += Packaged;
In my Packaged method I skipped data type items that shouldn't be ovewritten on target environment.
In new version of Courier I can't use this approach, cause DataTypeProvider.Instance() doesn't exist. I tried to take DataTypeProvider instance from providers collection ProviderModel.ItemProviderCollection.Instance and subscribe on Packaged event, but it didn't fire.
As 2-nd approach I implemented custom data resolver and overrided ResolvableTypes, ShouldExecute, Packaging as described here https://github.com/umbraco/Courier/blob/master/Documentation/Developer%20Documentation/Data%20Resolvers.md
It fires, but items are still in package.
I'll appreciate if somebody can share how can I hook up packaging/extraction procedure in new courier.
Thanks in adnvance!
Update: Problem is solved using following assignment:
PackagingManagerEvents.PackagingItem += PackagingManagerEventsOnPackagingItem
is working on a reply...