Get the version number of the given instance state snapshot

Namespace:  NHibernate.Engine
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function GetVersion ( _
	fields As Object(), _
	persister As IEntityPersister _
) As Object
C#
public static Object GetVersion(
	Object[] fields,
	IEntityPersister persister
)
Visual C++
public:
static Object^ GetVersion(
	array<Object^>^ fields, 
	IEntityPersister^ persister
)
JavaScript
NHibernate.Engine.Versioning.getVersion = function(fields, persister);

Parameters

fields
Type: array< System..::.Object >[]()[]
An array of objects that contains a snapshot of a persistent object.
persister
Type: NHibernate.Persister.Entity..::.IEntityPersister
The IEntityPersister that is responsible for persisting the values of the fields parameter.

Return Value

The value of the version contained in the fields parameter or null if the Entity is not versioned.

See Also