All Classes Namespaces Functions Variables Enumerations Enumerator Properties
plyCommon.UniqueID Class Reference

A Serializable unique identifier. More...

Inherits IEquatable< UniqueID >.

Public Member Functions

 UniqueID ()
 Creates an empty id. Note that id might not be empty after it is deserialized if this id was serialized before. More...
 
 UniqueID (string id)
 Create the id with given value More...
 
UniqueID Copy ()
 Returns a copy of this id More...
 
override bool Equals (object obj)
 
bool Equals (UniqueID guid)
 
override int GetHashCode ()
 
override string ToString ()
 The string representation of the id's value. This string is valid for use with 'new GUID(string someStringID)' More...
 

Static Public Member Functions

static UniqueID Create ()
 Creates and return a new (not empty) id More...
 
static UniqueID Create (UniqueID id)
 Creates and return new id if the passed id is null or empty, else return passed id. More...
 
static bool operator== (UniqueID a, UniqueID b)
 
static bool operator!= (UniqueID a, UniqueID b)
 
static bool ListContains (List< UniqueID > list, UniqueID id)
 Will return true if the list contains the given id More...
 

Properties

System.Guid Value [get, set]
 Gets or sets the unique identifier. More...
 
bool IsEmpty [get]
 Return true of the ID is empty, false if not More...
 
static UniqueID Empty [get]
 Creates and return a new empty id More...
 

Detailed Description

A Serializable unique identifier.

Constructor & Destructor Documentation

plyCommon.UniqueID.UniqueID ( )

Creates an empty id. Note that id might not be empty after it is deserialized if this id was serialized before.

plyCommon.UniqueID.UniqueID ( string  id)

Create the id with given value

Member Function Documentation

UniqueID plyCommon.UniqueID.Copy ( )

Returns a copy of this id

static UniqueID plyCommon.UniqueID.Create ( )
static

Creates and return a new (not empty) id

static UniqueID plyCommon.UniqueID.Create ( UniqueID  id)
static

Creates and return new id if the passed id is null or empty, else return passed id.

static bool plyCommon.UniqueID.ListContains ( List< UniqueID list,
UniqueID  id 
)
static

Will return true if the list contains the given id

override string plyCommon.UniqueID.ToString ( )

The string representation of the id's value. This string is valid for use with 'new GUID(string someStringID)'

Returns
A string that represents this object.

Property Documentation

UniqueID plyCommon.UniqueID.Empty
staticget

Creates and return a new empty id

bool plyCommon.UniqueID.IsEmpty
get

Return true of the ID is empty, false if not

System.Guid plyCommon.UniqueID.Value
getset

Gets or sets the unique identifier.