GUID
Description
- Derived from
Helper class for generating 128-bit globally unique identifiers (GUIDs).
GUIDs are usually given in the following form: {00000000-0000-0000-0000-000000000000}
Public / Constructors
Digest
2 overloads
Digests the given string value and returns a GUID as a result.
Digests the given string values and returns a GUID as a result.
From
3 overloads
Creates a new instance of GUID from the given GUID string.
GUID strings are required to match the following grammar:
guid      := '{' parts '}' | '"' parts '"' | '\'' parts '\'' | parts ;
parts     := hex-digit[32] | hex-digit[8] ('-' hex-digit[4])[3] '-' hex-digit[12] ;
hex-digit := '0'..'9' | 'a'..'f' | 'A'..'F' ;
- ValidatingException
- 
If the given guid in string is malformed. 
Creates a new instance of GUID from the next 16 bytes in the given buffer (see ByteOrder.BigEndian).
Creates a new instance of GUID from the bytes in the given array (see ByteOrder.BigEndian).
Generate
Generates a new GUID value.
This method uses a simple hashing algorithm for generating reasonable good GUID values. To do so, it digests the following information:
The following values are used to increase randomness:
- 
An internal global counter, incremented by each call to Generate. 
- 
An internal global RandomNumber instance, yielding the random seed bits for the GUID value. 
If higher quality GUID values are required, please resort to native OS functions, for example:
- 
CoCreateGuid(WinAPI)
- 
uuid_generate(Linux)
GUID
Creates a new instance of GUID.
{00000000-0000-0000-0000-000000000000}
 ........ .... .... .... ............
 \__/          \__/ \__/         \__/
  MSB           LSB  MSB          LSB
   \_____________/    \____________/
        first             second
Public / Methods
ToBuffer
2 overloads
Converts this GUID into a sequence of bytes.
Converts this GUID into a sequence of bytes (see ByteOrder.BigEndian).
The bytes of this GUID will be appended to the given byte buffer.