public static EventPlug[] Enumerate(IActor actor)
        {
            List <EventPlug> list = new List <EventPlug>();

            foreach (EventInfo e in actor.GetType().GetEvents())
            {
                EventPlug plug = Create(e, actor);
                if (plug != null)
                {
                    list.Add(plug);
                }
            }

            return(list.ToArray());
        }
Exemple #2
0
        protected override void ReleaseManaged()
        {
            EventPlug eventPlug = this.Source as EventPlug;

            eventPlug.EventInfo.RemoveEventHandler(eventPlug.Owner, connectionDelegate);
        }