Skip to main content
added 2 characters in body
Source Link
Marko Milic
  • 8.9k
  • 3
  • 24
  • 60

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

I'm trying to rewrite the old event system (2009) to the new 2013 event system. Where it used to be a OnFolderPasteItemPost 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

I'm trying to rewrite the old event system (2009) to the new 2013 event system. Where it used to be a OnFolderPasteItemPost 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

Formatting code
Source Link
Dominic Cronin
  • 18.5k
  • 3
  • 23
  • 74

I'm trying to rewrite the old event system (2009) to the new 2013 event system. Where it used to be a OnFolderPasteItemPost 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

I'm trying to rewrite the old event system (2009) to the new 2013 event system. Where it used to be a OnFolderPasteItemPost 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

I'm trying to rewrite the old event system (2009) to the new 2013 event system. Where it used to be a OnFolderPasteItemPost 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

Tweeted twitter.com/#!/StackTridion/status/344421531646033921
Source Link

2013 Event System; Folder paste event is not called

I'm trying to rewrite the old event system (2009) to the new 2013 event system. Where it used to be a OnFolderPasteItemPost 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