Creates an IIdentifierGenerator from the named strategy.

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

Syntax

Visual Basic (Declaration)
Public Shared Function Create ( _
	strategy As String, _
	type As IType, _
	parms As IDictionary, _
	dialect As Dialect _
) As IIdentifierGenerator
C#
public static IIdentifierGenerator Create(
	string strategy,
	IType type,
	IDictionary parms,
	Dialect dialect
)
Visual C++
public:
static IIdentifierGenerator^ Create(
	String^ strategy, 
	IType^ type, 
	IDictionary^ parms, 
	Dialect^ dialect
)
JavaScript
NHibernate.Id.IdentifierGeneratorFactory.create = function(strategy, type, parms, dialect);

Parameters

strategy
Type: System..::.String
The name of the generator to create. This can be one of the NHibernate abbreviations (ie - native, sequence, guid.comb, etc...), a full class name if the Type is in the NHibernate assembly, or a full type name if the strategy is in an external assembly.
type
Type: NHibernate.Type..::.IType
The IType that the retured identifier should be.
parms
Type: System.Collections..::.IDictionary
An IDictionary of <param> values from the mapping.
dialect
Type: NHibernate.Dialect..::.Dialect
The Dialect to help with Configuration.

Return Value

An instantiated and configured IIdentifierGenerator.

Exceptions

ExceptionCondition
NHibernate..::.MappingException Thrown if there are any exceptions while creating the IIdentifierGenerator.

See Also