Skip to content

Get Sansar

Script API

SessionId

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Struct Namespace Sansar.Script

Encapsulates a Session Id.

public struct SessionId

Remarks

Session ids are unique per agent session

Members at a glance

KindMembers
FieldsInvalid
MethodsEquals · GetHashCode · ToString
Operatorsop_Equality · op_Implicit · op_Inequality

Fields

Invalid

public static readonly SessionId Invalid

The invalid id session.

Remarks

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

Methods

Equals

public override bool Equals(object obj)

Value comparison for SessionId.

ParameterTypeDescription
objobjectThe session to compare.

Returns: bool — true if the argument is an SessionId and has the same value.

Remarks

This method overrides ValueType.Equals.

GetHashCode

public override int GetHashCode()

Retrieves the hash code for this instance.

Returns: int — The hash code for this instance.

Remarks

This method overrides ValueType.GetHashCode.

ToString

public override string ToString()

Converts the id to a hexadecimal string representation.

Returns: string — The hexadecimal string representation.

Remarks

This method overrides Session.ToString.

Operators

op_Equality

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

SessionId equality operator.

ParameterTypeDescription
aSessionIdFirst SessionId to compare.
bSessionIdSecond SessionId to compare.

Returns: bool — true if the SessionIds have the same value.

Remarks

This is a value comparison.

op_Implicit

public static implicit operator SessionId(int id)

Internal explicit conversion from a int.

ParameterTypeDescription
idintA int representation of an SessionId

Returns: SessionId — A new SessionId initialized with the given int.

Remarks

Internal.

op_Inequality

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

SessionId inequality operator.

ParameterTypeDescription
aSessionIdFirst SessionId to compare.
bSessionIdSecond SessionId to compare.

Returns: bool — true if the SessionIds have a different value.

Remarks

This is a value comparison.

Used in examples

…and 28 more examples in the snapshot.

Generated from the Sansar 47.10.0 client ScriptApi snapshot.