Table of Contents

Class IdGenerator

Namespace
Dynamicweb.Content.Items.Activation
Assembly
Dynamicweb.dll
Represents an item Id generator. This class cannot be inherited.
public sealed class IdGenerator
Inheritance
IdGenerator
Inherited Members

Methods

Next(string)

Generates the new Id for a given item type.
public static string Next(string itemType)

Parameters

itemType string
Item type.

Returns

string
New Id for a given item type.

Next(string, int)

Generates new Ids for a given item type.
public static IEnumerable<string> Next(string itemType, int amount)

Parameters

itemType string
Item type.
amount int
The number of Ids to generate.

Returns

IEnumerable<string>
New Ids for a given item type.

Next<T>()

Generates the new Id for a given item type.
public static string Next<T>() where T : ItemEntry

Returns

string
New Id for a given item type.

Type Parameters

T
Item type.

Next<T>(int)

Generates new Ids for a given item type.
public static IEnumerable<string> Next<T>(int amount) where T : ItemEntry

Parameters

amount int
The number of Ids to generate.

Returns

IEnumerable<string>
New Ids for a given item type.

Type Parameters

T
Item type.

Peek(string)

Returns the next available Id for a given item type.
public static string Peek(string itemType)

Parameters

itemType string
Item type.

Returns

string
The next available Id for a given item type.

Remarks

This method does not update the Id counter and should not be used for assigning Ids to items.

Peek<T>()

Returns the next available Id for a given item type.
public static string Peek<T>() where T : ItemEntry

Returns

string
The next available Id for a given item type.

Type Parameters

T
Item type.

Remarks

This method does not update the Id counter and should not be used for assigning Ids to items.
To top