MillisecondIdGenerator
Ecng.Common
Identifier generator based on milliseconds. Each subsequent call to GetNextId returns the number of milliseconds elapsed since the instance was created.
继承自: IdGenerator
构造函数
MillisecondIdGenerator
public MillisecondIdGenerator()
millisecondIdGenerator = MillisecondIdGenerator()
Initializes a new instance of the MillisecondIdGenerator class.
方法
GetNextId
public override long GetNextId()
result = millisecondIdGenerator.GetNextId()
Gets the next identifier representing the number of milliseconds elapsed since the object was created.
返回值: The number of milliseconds elapsed.