using System; using System.Reflection; namespace Tests.Caliburn { public static class Helper { public static bool HasWiredEvent(object publisher, string eventName) { FieldInfo fieldInfo = publisher.GetType() .GetField(eventName, BindingFlags.Instance | BindingFlags.NonPublic); Delegate del = (Delegate) fieldInfo.GetValue(publisher); Delegate[] list = del.GetInvocationList(); return list.Length == 1; } } }