Ejemplo n.º 1
0
        public static void RegistreTodosOsEventos(this ManagerConnection manager)
        {
            var events = manager.GetType()
                         .GetEvents();

            foreach (var evento in events)
            {
                evento.AddEventHandler(
                    manager,
                    Delegate.CreateDelegate(evento.EventHandlerType,
                                            typeof(Program).GetMethod("EventSaveDelegate")));
            }
        }