I'm trying to rewrite the old event system (2009) to the new 2013 event system.
Where it used to be a OnFolderPasteItemPostOnFolderPasteItemPost
event. I now register the event as follows:
EventSubscription _subscription;
_subscription = EventSystem.Subscribe<Folder, MoveEventArgs>(
HandlerForFolderPostCutPaste, EventPhases.Processed);
_subscription = EventSystem.Subscribe<Folder, CopyEventArgs>(
HandlerForFolderPostCopyPaste, EventPhases.Processed);
Which calls to the following code:
private void HandlerForFolderPostCutPaste(
Folder subject, MoveEventArgs args, EventPhases phase)
{
Trace.WriteLine("Called OnFolderPasteItemCommittedEvent on Events: "
+ Utilities.GetPubEventSystem(subject.OwningRepository.Title
, config).ToString(), "EventSystem");
}
private void HandlerForFolderPostCopyPaste(Folder subject,
CopyEventArgs args, EventPhases phase)
{
Trace.WriteLine("Called OnFolderPasteItemCommittedEvent on Events: "
+ Utilities.GetPubEventSystem(subject.OwningRepository.Title, config).ToString(),
"EventSystem");
}
But when i place breakpoints on the methods, it will not break. Nor will it write anything to the trace.
I'm attaching to the process: TcmServiceHost.exe