Table of Contents

Class Session

Namespace
Xabbo
Assembly
Xabbo.Common.dll

Represents a connection session.

public sealed record Session : IEquatable<Session>
Inheritance
Session
Implements

Constructors

Session(Hotel, Client)

Represents a connection session.

public Session(Hotel Hotel, Client Client)

Parameters

Hotel Hotel

The hotel of the current session.

Client Client

The client of the current session.

Fields

None

Represents no session.

public static readonly Session None

Field Value

Session

Properties

Client

The client of the current session.

public Client Client { get; init; }

Property Value

Client

Hotel

The hotel of the current session.

public Hotel Hotel { get; init; }

Property Value

Hotel

Methods

Is(ClientType)

Gets whether the session is any of the specified clients.

public bool Is(ClientType client)

Parameters

client ClientType

The client to test for. This may be a combination of multiple clients.

Returns

bool

true if the specified client type contains the current session's client.

Operators

operator ==(Session, ClientType)

public static bool operator ==(Session session, ClientType client)

Parameters

session Session
client ClientType

Returns

bool

operator !=(Session, ClientType)

public static bool operator !=(Session session, ClientType client)

Parameters

session Session
client ClientType

Returns

bool