Allows user code to inspect and/or change property values before they are written and after they
are read from the database
Namespace:
NHibernateAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Interface IInterceptor |
C# |
---|
public interface IInterceptor |
Visual C++ |
---|
public interface class IInterceptor |
JavaScript |
---|
NHibernate.IInterceptor = function(); NHibernate.IInterceptor.createInterface('NHibernate.IInterceptor'); |
Remarks
There might be a single instance of IInterceptor for a SessionFactory, or a new instance might be specified for each ISession. Whichever approach is used, the interceptor must be serializable if the ISession is to be serializable. This means that SessionFactory -scoped interceptors should implement ReadResolve().
The ISession may not be invoked from a callback (nor may a callback cause a collection or proxy to be lazily initialized).