摘要:
松耦合事件实现方法有多种,本文重点描述使用spring.net来实现。并同时给出其他实现方案。一,spring.netSpring.Objects.Events.IEventRegistry接口封装了事件注册中心,spring容器通过Spring.Objects.Events.Support.EventRegistry对象代理实现了这个事件注册中心。于是我们可以使用如下几个方法把事件注册到容器中。void PublishEvents(object sourceObject);void Subscribe(object subscriber);void Subscribe(object subs 阅读全文
摘要:
整理一下,以防下次再浪费时间了。app.config配置方法(Log4net v1.2.0 )1,app.config中<configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /></configSections><log4net> <!-- Define some output appenders -->。。。 <!-- Setup 阅读全文