C# Class CqlSharp.TimeGuid

Helper class to generate Time based GUIDs. Thanks to Casssandra-Sharp project.
Afficher le fichier Open project: reuzel/CqlSharp

Méthodes publiques

Свойство Type Description
Default System.Guid
GregorianCalendarStart DateTime

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
CreateNodeId ( ) : byte[]

Creates a node unique identifier.

TimeGuid ( ) : System

Initializes the TimeGuid class.

Method Details

GenerateTimeBasedGuid() public static méthode

Generates a time based unique identifier, set to the current time.
public static GenerateTimeBasedGuid ( ) : System.Guid
Résultat System.Guid

GenerateTimeBasedGuid() public static méthode

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.
Résultat System.Guid

GenerateTimeBasedGuid() public static méthode

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 ///
Résultat Guid

GetDateTime() public static méthode

Gets the date time from the provided Guid.
public static GetDateTime ( this guid ) : DateTime
guid this The unique identifier.
Résultat DateTime

Property Details

Default public_oe static_oe property

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
Résultat System.Guid

GregorianCalendarStart public_oe static_oe property

public static DateTime GregorianCalendarStart
Résultat DateTime