Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
While creating a package, I have registered an event in ApplicationStarted like this:
Umbraco.Core.Services.ContentService.Published +=ContentService_Published;
The ApplicationStarted method is part of my package custom class. Now on uninstalling the package, I wanted to unregister this event. How to do it? Adding "minus" sign is not working
Umbraco.Core.Services.ContentService.Published -=ContentService_Published;
Hi Amna
If the Application started method is part of a package, then I assume it is part of a dll file that gets copied on install of the package.
If so, then when you uninstall the package, the custom dll would be removed from the site, therefore removing the Application Started event ?
Or have I misunderstood your question ?
Nigel
Yes Nigel, You are right. I was confused if the events which get bind once will always be there.
All good - please mark a reply as a solution so others know it's sorted.
Cheers
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Unregister the registered event
While creating a package, I have registered an event in ApplicationStarted like this:
The ApplicationStarted method is part of my package custom class. Now on uninstalling the package, I wanted to unregister this event. How to do it? Adding "minus" sign is not working
Hi Amna
If the Application started method is part of a package, then I assume it is part of a dll file that gets copied on install of the package.
If so, then when you uninstall the package, the custom dll would be removed from the site, therefore removing the Application Started event ?
Or have I misunderstood your question ?
Nigel
Yes Nigel, You are right. I was confused if the events which get bind once will always be there.
All good - please mark a reply as a solution so others know it's sorted.
Cheers
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.