SessionId

Sansar.Script.SessionId

SessionId Struct

Encapsulates a Session Id.

Syntax

public struct SessionId

Remarks

Session ids are unique per agent session

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 SessionId . The invalid id session.

Public Methods

override
Equals (object) : bool
Value comparison for SessionId.
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 (SessionId, SessionId) SessionId equality operator.
static
Inequality (SessionId, SessionId) SessionId inequality operator.
static
Conversion to Sansar.Script.SessionId (Implicit) Internal explicit conversion from a int.

Member Details

Equals Method

Value comparison for SessionId.

Syntax

public override bool Equals (object obj)

Parameters

obj
The session to compare.

Returns

true if the argument is an SessionId 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 session.

Syntax

public static readonly SessionId Invalid

Remarks

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

Requirements

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

op_Equality Method

SessionId equality operator.

Syntax

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

Parameters

a
First SessionId to compare.
b
Second SessionId to compare.

Returns

true if the SessionIds 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 int.

Syntax

public static implicit operator SessionId (int id)

Parameters

id
A int representation of an SessionId

Returns

A new SessionId initialized with the given int.

Remarks

Internal.

Requirements

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

op_Inequality Method

SessionId inequality operator.

Syntax

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

Parameters

a
First SessionId to compare.
b
Second SessionId to compare.

Returns

true if the SessionIds 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 Session.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.