ObjectId

ObjectId Struct

Encapsulates an Object Id.

Syntax

public struct ObjectId

Remarks

An ObjectId can be derived from a Sansar.Script.ComponentId.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from ValueType.

Public Fields

static readonly
Invalid ObjectId . The invalid id object.

Public Methods

override
Equals (object) : bool
Value comparison for ObjectId.
override
GetHashCode () : int
Retrieves the hash code for this instance.
override
ToString () : string
Converts the id to a hexadecimal string representation.

Public Operators

static
Equality (ObjectIdObjectId) ObjectId equality operator.
static
Inequality (ObjectIdObjectId) ObjectId inequality operator.
static
Conversion to Sansar.Script.ObjectId (Implicit) Internal explicit conversion from a uint.

Member Details

Equals Method

Value comparison for ObjectId.

Syntax

public override bool Equals (object obj)

Parameters

obj
The object to compare.

Returns

true if the argument is an ObjectId and has the same value.

Remarks

This method overrides ValueType.Equals.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

GetHashCode Method

Retrieves the hash code for this instance.

Syntax

public override int GetHashCode ()

Returns

The hash code for this instance.

Remarks

This method overrides ValueType.GetHashCode.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Invalid Field

The invalid id object.

Syntax

public static readonly ObjectId Invalid

Remarks

This value is used by certain APIs to represent an invalid ObjectId.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

op_Equality Method

ObjectId equality operator.

Syntax

public static bool operator== (ObjectId a, ObjectId b)

Parameters

a
First ObjectId to compare.
b
Second ObjectId to compare.

Returns

true if the ObjectIds have the same value.

Remarks

This is a value comparison.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Conversion Method

Internal explicit conversion from a uint.

Syntax

public static implicit operator ObjectId (uint id)

Parameters

id
A uint representation of an ObjectId

Returns

A new ObjectId initialized with the given uint.

Remarks

Internal.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

op_Inequality Method

ObjectId inequality operator.

Syntax

public static bool operator!= (ObjectId a, ObjectId b)

Parameters

a
First ObjectId to compare.
b
Second ObjectId to compare.

Returns

true if the ObjectIds have a different value.

Remarks

This is a value comparison.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

ToString Method

Converts the id to a hexadecimal string representation.

Syntax

public override string ToString ()

Returns

The hexadecimal string representation.

Remarks

This method overrides object.ToString.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0


 
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.