Called just before an object is initialized

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

Syntax

C#
bool OnLoad(
	Object entity,
	Object id,
	Object[] state,
	string[] propertyNames,
	IType[] types
)
Visual Basic
Function OnLoad ( _
	entity As Object, _
	id As Object, _
	state As Object(), _
	propertyNames As String(), _
	types As IType() _
) As Boolean
Visual C++
bool OnLoad(
	Object^ entity, 
	Object^ id, 
	array<Object^>^ state, 
	array<String^>^ propertyNames, 
	array<IType^>^ types
)

Parameters

entity
Type: System..::..Object

[Missing <param name="entity"/> documentation for "M:NHibernate.IInterceptor.OnLoad(System.Object,System.Object,System.Object[],System.String[],NHibernate.Type.IType[])"]

id
Type: System..::..Object

[Missing <param name="id"/> documentation for "M:NHibernate.IInterceptor.OnLoad(System.Object,System.Object,System.Object[],System.String[],NHibernate.Type.IType[])"]

state
Type: array<System..::..Object>[]()[][]

[Missing <param name="state"/> documentation for "M:NHibernate.IInterceptor.OnLoad(System.Object,System.Object,System.Object[],System.String[],NHibernate.Type.IType[])"]

propertyNames
Type: array<System..::..String>[]()[][]

[Missing <param name="propertyNames"/> documentation for "M:NHibernate.IInterceptor.OnLoad(System.Object,System.Object,System.Object[],System.String[],NHibernate.Type.IType[])"]

types
Type: array<NHibernate.Type..::..IType>[]()[][]

[Missing <param name="types"/> documentation for "M:NHibernate.IInterceptor.OnLoad(System.Object,System.Object,System.Object[],System.String[],NHibernate.Type.IType[])"]

Return Value

trueTruetruetrue (True in Visual Basic) if the user modified the state in any way

Remarks

The interceptor may change the state, which will be propagated to the persistent object. Note that when this method is called, entity will be an empty uninitialized instance of the class.

See Also