Guid class

Class that emulates as closely as possible the C# Guid type.

Constructors

Guid(String? v)
Constructor, expects a valid UUID and will throw an exception if the value provided is invalid.
Guid.generate()
Generates a new v4 UUID during instantiation and returns a GUID instance with the new UUID.

Properties

hashCode int
Returns the hashCode.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
Gets the UUID value contained by the Guid object as a string.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Gets the UUID value contained by the Guid object as a string.
override

Operators

operator ==(Object other) bool
Performs a case insensitive comparison on the UUIDs contained in two Guid objects. Comparison is by value and not by reference.
override

Static Properties

defaultValue Guid
The Guid whose value is the default sequence of characters that represent a 'zero-value' UUID in .Net "00000000-0000-0000-0000-000000000000"
no setter
newGuid Guid
Generates a new v4 UUID and returns a GUID instance with the new UUID.
no setter

Static Methods

isValid(Guid? guid) bool
Checks whether a value is a valid Guid Returns false if 'guid' is null or has an invalid value Returns true if guid is valid