C# Class Castle.ActiveRecord.EventListenerContributor

Inheritance: INHContributor
Mostra file Open project: shosca/ActiveRecord Class Usage Examples

Public Methods

Method Description
Add ( EventListenerConfig config ) : EventListenerConfig

Adds an event listener configuration

Contribute ( NHibernate.Cfg.Configuration configuration ) : void

Configures the configuration with the registered listeners according the config

Get ( Type listenerType ) : EventListenerConfig

Returns the listener config for a specified listener type.

Remove ( Type listenerType ) : EventListenerConfig

Gets and removes the configuration for the type.

Private Methods

Method Description
CollectListeners ( Type type ) : Castle.ActiveRecord.EventListenerConfig[]
GetEventTypes ( Type listenerType ) : System.Type[]
GetExistingListeners ( NHibernate.Cfg.Configuration configuration, Type eventType ) : object[]
GetInstance ( EventListenerConfig config ) : object
SetListeners ( NHibernate.Cfg.Configuration configuration, Type eventType, Array listenersToSet ) : void

Method Details

Add() public method

Adds an event listener configuration
When the configuration is null When the configuration is already present.
public Add ( EventListenerConfig config ) : EventListenerConfig
config EventListenerConfig the configuration to add
return EventListenerConfig

Contribute() public method

Configures the configuration with the registered listeners according the config
public Contribute ( NHibernate.Cfg.Configuration configuration ) : void
configuration NHibernate.Cfg.Configuration the configuration object to add the listeners to
return void

Get() public method

Returns the listener config for a specified listener type.
public Get ( Type listenerType ) : EventListenerConfig
listenerType System.Type the type to look for
return EventListenerConfig

Remove() public method

Gets and removes the configuration for the type.
public Remove ( Type listenerType ) : EventListenerConfig
listenerType System.Type the type to look for
return EventListenerConfig