public AbstractKernelEvents()
 {
     m_events = new EventHandlerList();
     m_service2Key = new Hashtable();
     m_dependencyToSatisfy = new Hashtable();
     m_proxy2ComponentWrapper = new Hashtable();
     InterceptedComponentBuilder = new DefaultInterceptedComponentBuilder();
 }
        public void Init()
        {
            IInterceptedComponentBuilder interceptorManager = new DefaultInterceptedComponentBuilder();

            m_service = new ServiceImpl();

            m_component = interceptorManager.CreateInterceptedComponent(
                m_service, typeof (IService));

            m_proxiedService = m_component.ProxiedInstance as IService;
        }
        public void CreateInterceptedComponent()
        {
            IInterceptedComponentBuilder interceptorManager = new DefaultInterceptedComponentBuilder();

            IMailService mailService = new SimpleMailService();

            IInterceptedComponent component =
                interceptorManager.CreateInterceptedComponent(
                    mailService, typeof(IMailService) );
            AssertNotNull( "Proxy not created", component.ProxiedInstance );

            IMailService proxiedMailService = component.ProxiedInstance as IMailService;
            AssertNotNull( "Could not cast to IMailService", proxiedMailService );
        }