The interface to be implemented by user-defined types.

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

Syntax

C#
public interface IUserType
Visual Basic
Public Interface IUserType
Visual C++
public interface class IUserType

Remarks

The interface abstracts user code from future changes to the IType interface, simplifies the implementation of custom types and hides certain "internal interfaces from user code.

Implementers must be immutable and must declare a public default constructor.

The actual class mapped by a IUserType may be just about anything. However, if it is to be cacheble by a persistent cache, it must be serializable.

Alternatively, custom types could implement IType directly or extend one of the abstract classes in NHibernate.Type. This approach risks future incompatible changes to classes or interfaces in the package.

See Also