Set or clear listener for a given ListenerType.

Namespace: NHibernate.Cfg
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public void SetListeners(
	ListenerType type,
	string[] listenerClasses
)
Visual Basic
Public Sub SetListeners ( _
	type As ListenerType, _
	listenerClasses As String() _
)
Visual C++
public:
void SetListeners(
	ListenerType type, 
	array<String^>^ listenerClasses
)

Parameters

type
Type: NHibernate.Event..::..ListenerType
The ListenerType.
listenerClasses
Type: array<System..::..String>[]()[][]
The array of AssemblyQualifiedName of each listener for type.

Remarks

listenerClasses must implements the interface related with type. All listeners of the given ListenerType will be cleared if the listenerClasses is null or empty.

Exceptions

ExceptionCondition
NHibernate..::..MappingException when an element of listenerClasses have an invalid value or cant be instantiated.

See Also