12

I have the following code, which is as generic an events system as you could imagine. When it's deployed, and I attach a debugger to the process, when an event takes place I can see the assembly getting loaded into the process, with symbols, but the code appears not to execute, and I can't get a breakpoint to bite. What am I missing?

[TcmExtension("FoobarEventsSystem")]
class Events : Tridion.ContentManager.Extensibility.TcmExtension
{
    public Events()
    {
        EventSystem.Subscribe<IdentifiableObject, TcmEventArgs>(
                      Handler, EventPhases.All, EventSubscriptionOrder.Normal);
    }
    private void Handler(IdentifiableObject subject, TcmEventArgs args, EventPhases phase)
    {
        Debug.WriteLine("foobar");
    }
}

1 Answer 1

12

Make the class public:

public class Events : Tridion.ContentManager.Extensibility.TcmExtension
1
  • This works. Thanks. Obvious when you know the answer. :-) Mar 6, 2013 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.