C# Класс CqlSharp.TimeGuid

Helper class to generate Time based GUIDs. Thanks to Casssandra-Sharp project.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Default System.Guid
GregorianCalendarStart DateTime

Открытые методы

Метод Описание
GenerateTimeBasedGuid ( ) : System.Guid

Generates a time based unique identifier, set to the current time.

GenerateTimeBasedGuid ( long time, int sequence, byte nodeId ) : System.Guid

Generates a time based unique identifier.

GenerateTimeBasedGuid ( this dateTime, byte node = null ) : Guid

Generates a time based unique identifier.

GetDateTime ( this guid ) : DateTime

Gets the date time from the provided Guid.

Приватные методы

Метод Описание
CreateNodeId ( ) : byte[]

Creates a node unique identifier.

TimeGuid ( ) : System

Initializes the TimeGuid class.

Описание методов

GenerateTimeBasedGuid() публичный статический Метод

Generates a time based unique identifier, set to the current time.
public static GenerateTimeBasedGuid ( ) : System.Guid
Результат System.Guid

GenerateTimeBasedGuid() публичный статический Метод

Generates a time based unique identifier.
public static GenerateTimeBasedGuid ( long time, int sequence, byte nodeId ) : System.Guid
time long The time, being the number of 100ns intervals since Gregorian Calendar start
sequence int The sequence, or clockId.
nodeId byte The node unique identifier.
Результат System.Guid

GenerateTimeBasedGuid() публичный статический Метод

Generates a time based unique identifier.
public static GenerateTimeBasedGuid ( this dateTime, byte node = null ) : Guid
dateTime this The date time.
node byte /// The node. Must either be null or a 6 byte array. When set to null (recommended), a random node id /// will be provided ///
Результат Guid

GetDateTime() публичный статический Метод

Gets the date time from the provided Guid.
public static GetDateTime ( this guid ) : DateTime
guid this The unique identifier.
Результат DateTime

Описание свойств

Default публичное статическое свойство

The default Time Guid (nodeId, time and sequence all set to 0, but having the version number set to timeguid)
public static Guid,System Default
Результат System.Guid

GregorianCalendarStart публичное статическое свойство

public static DateTime GregorianCalendarStart
Результат DateTime