Class Hotel
- Namespace
- Xabbo
- Assembly
- Xabbo.Common.dll
Represents a hotel region.
public sealed record Hotel : IEquatable<Hotel>
- Inheritance
-
Hotel
- Implements
Constructors
Hotel(string, string?, string, string, string, string?, bool)
Creates a new hotel instance.
[JsonConstructor]
public Hotel(string name, string? identifier = null, string subdomain = "www", string domain = "com", string host = "habbo", string? gameHost = null, bool isOrigins = false)
Parameters
name
stringThe name of the hotel.
identifier
stringThe short identifier of the hotel, e.g. "us".
subdomain
stringThe subdomain, e.g. "www", "sandbox".
domain
stringThe top-level domain, e.g. "com", "com.br".
host
stringThe hostname, e.g. "habbo".
gameHost
stringThe game host, defaults to "game-{identifier}.habbo.com".
isOrigins
boolWhether this is an Origins hotel.
Fields
None
Represents no particular hotel.
public static readonly Hotel None
Field Value
Properties
All
Contains the definitions of all hotels, mapped by their identifier.
public static ImmutableDictionary<string, Hotel> All { get; }
Property Value
Domain
Gets the top-level domain of this hotel, e.g. "com", "com.br".
public string Domain { get; init; }
Property Value
GameHost
Gets the game host for this hotel.
public string GameHost { get; init; }
Property Value
HostName
Gets the hostname for this hotel, e.g. "habbo".
public string HostName { get; init; }
Property Value
Identifier
Gets the identifier of this hotel, e.g. "us", "nl".
public string Identifier { get; init; }
Property Value
IsOrigins
Gets whether this is an origins hotel.
public bool IsOrigins { get; init; }
Property Value
Name
Gets the name of this hotel, e.g. "US", "Netherlands".
public string Name { get; init; }
Property Value
Subdomain
Gets the subdomain of this hotel, e.g. "www", "sandbox".
public string Subdomain { get; init; }
Property Value
WebHost
Gets the web host for this hotel, e.g. "www.habbo.com".
public string WebHost { get; }
Property Value
Methods
FromGameHost(string)
Gets the hotel with the specified game host, e.g. "game-us.habbo.com".
public static Hotel FromGameHost(string gameHost)
Parameters
gameHost
string
Returns
FromIdentifier(string)
Gets the hotel with the specified identifier, e.g. "us".
public static Hotel FromIdentifier(string identifier)
Parameters
identifier
string
Returns
ToString()
Returns the name of the hotel.
public override string ToString()