使用反射动态绑定与移除方法
摘要:
public void AddPublisher(object publisher, string eventName) { publishers.Add(publisher); EventInfo targetEvent = publisher.GetType().GetEvent(eventName); GuardEventExists(eventName, publisher, targetEvent); MethodInfo addEventMethod = targetEvent.GetAddMethod(); GuardAddMethodExists(targetEvent);/. 阅读全文
posted @ 2011-03-17 09:27 遗忘海岸 阅读(339) 评论(1) 推荐(0) 编辑