C# Class Castle.Facilities.EventWiring.EventWiringFacility

Facility to allow components to dynamically subscribe to events offered by other components. We call the component that offers events publishers and the components that uses them, subscribers.
A component that wish to subscribe to an event must use the external configuration adding a node subscribers on the publisher. This node can have multiple entries using the subscriber node.
Inheritance: Castle.MicroKernel.Facilities.AbstractFacility
Mostrar archivo Open project: castleproject/Windsor

Protected Methods

Method Description
Init ( ) : void

Overridden. Initializes the facility, subscribing to the IKernelEvents.ComponentModelCreated, IKernelEvents.ComponentCreated, IKernelEvents.ComponentDestroyed Kernel events.

Private Methods

Method Description
AssertValidHandler ( IHandler handler, string subscriberKey ) : void
IsPublisher ( ComponentModel model ) : bool
OnComponentCreated ( ComponentModel model, object instance ) : void

Checks if the component we're dealing is a publisher. If it is, iterates the subscribers starting them and wiring the events.

OnComponentDestroyed ( ComponentModel model, object instance ) : void
StartAndWirePublisherSubscribers ( ComponentModel model, object publisher ) : void
WirePublisher ( ComponentModel model, object publisher ) : void

Method Details

Init() protected method

Overridden. Initializes the facility, subscribing to the IKernelEvents.ComponentModelCreated, IKernelEvents.ComponentCreated, IKernelEvents.ComponentDestroyed Kernel events.
protected Init ( ) : void
return void