Table of Contents

Class Id

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

This is an identifier for an Entity object in the Geotab system. In JavaScript this is a string.

public abstract class Id : IComparable<Id>
Inheritance
Id
Implements
Derived
Inherited Members

Constructors

Id()

protected Id()

Fields

Null

The instance of Null Id for internal usage.

public static readonly Id Null

Field Value

Id

Id

Methods

Clone()

Returns this instance.

public Id Clone()

Returns

Id

this instance of Id. No actual cloning is performed.

CompareTo(Id?)

public virtual int CompareTo(Id? other)

Parameters

other Id

Returns

int

Create(in Guid)

Converts Guid into Id.

public static Id Create(in Guid value)

Parameters

value Guid

The Guid value.

Returns

Id

The Id result.

Create(long)

Converts long into Id.

public static Id Create(long value)

Parameters

value long

The long value.

Returns

Id

The Id result.

Create(string)

Converts string into Id.

public static Id? Create(string value)

Parameters

value string

The string value.

Returns

Id

The Id result.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetValue()

Internal method that gets the boxed value of the underlying identifier.

public abstract object GetValue()

Returns

object

value of the database identifier.

SerializeId(Utf8JsonWriter, bool)

An method used to write the json representation of the id to the provided Utf8JsonWriter.

public abstract void SerializeId(Utf8JsonWriter writer, bool asPropertyName = false)

Parameters

writer Utf8JsonWriter

The Utf8JsonWriter to write the json representation of the id to.

asPropertyName bool

A bool indicating if the Id is to be a property name or a value. The default is value.

Operators

operator ==(Id?, Id?)

Operator == the specified entity. Allows the Id(s) to be compared as value types.

public static bool operator ==(Id? identifier1, Id? identifier2)

Parameters

identifier1 Id

The first entity.

identifier2 Id

The second entity.

Returns

bool

True if equals; otherwise false.

operator >(Id, Id)

Implements the operator >.

public static bool operator >(Id id1, Id id2)

Parameters

id1 Id

The first Id.

id2 Id

The second Id.

Returns

bool

The result of the operator.

operator >=(Id, Id)

Implements the operator >=.

public static bool operator >=(Id id1, Id id2)

Parameters

id1 Id

The first Id.

id2 Id

The second Id.

Returns

bool

The result of the operator.

operator !=(Id?, Id?)

Operator != the specified entity. Allows the Id(s) to be compared as value types.

public static bool operator !=(Id? identifier1, Id? identifier2)

Parameters

identifier1 Id

The first entity.

identifier2 Id

The second entity.

Returns

bool

True if not equal; otherwise false.

operator <(Id, Id)

Implements the operator <.

public static bool operator <(Id id1, Id id2)

Parameters

id1 Id

The first Id.

id2 Id

The second Id.

Returns

bool

The result of the operator.

operator <=(Id, Id)

Implements the operator <=.

public static bool operator <=(Id id1, Id id2)

Parameters

id1 Id

The first Id.

id2 Id

The second Id.

Returns

bool

The result of the operator.