Assembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Interface IUserType |
C# |
---|
public interface IUserType |
Visual C++ |
---|
public interface class IUserType |
JavaScript |
---|
NHibernate.UserTypes.IUserType = function(); NHibernate.UserTypes.IUserType.createInterface('NHibernate.UserTypes.IUserType'); |
Remarks
The inteface abstracts user code from future changes to the IType inteface, simplifies the implementation of custom types and hides certain "internal interfaces from user code.
Implemenators 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 intefaces in the package.