C# Класс RoomInfo, storyspace

A simplified room with just the info required to list and join, used for the room listing in the lobby. The properties are not settable (open, maxPlayers, etc).
This class resembles info about available rooms, as sent by the Master server's lobby. Consider all values as readonly. None are synced (only updated by events by server).
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
autoCleanUpField bool
maxPlayersField byte
nameField string
openField bool
visibleField bool

Открытые методы

Метод Описание
Equals ( object p ) : bool

Makes RoomInfo comparable (by name).

GetHashCode ( ) : int

Accompanies Equals, using the name's HashCode as return.

ToString ( ) : string

Simple printingin method.

Защищенные методы

Метод Описание
CacheProperties ( Hashtable propertiesToCache ) : void

Copies "well known" properties to fields (isVisible, etc) and caches the custom properties (string-keys only) in a local hashtable.

RoomInfo ( string roomName, Hashtable properties ) : System

Constructs a RoomInfo to be used in room listings in lobby.

Описание методов

CacheProperties() защищенный Метод

Copies "well known" properties to fields (isVisible, etc) and caches the custom properties (string-keys only) in a local hashtable.
protected CacheProperties ( Hashtable propertiesToCache ) : void
propertiesToCache Hashtable New or updated properties to store in this RoomInfo.
Результат void

Equals() публичный Метод

Makes RoomInfo comparable (by name).
public Equals ( object p ) : bool
p object
Результат bool

GetHashCode() публичный Метод

Accompanies Equals, using the name's HashCode as return.
public GetHashCode ( ) : int
Результат int

RoomInfo() защищенный Метод

Constructs a RoomInfo to be used in room listings in lobby.
protected RoomInfo ( string roomName, Hashtable properties ) : System
roomName string
properties Hashtable
Результат System

ToString() публичный Метод

Simple printingin method.
public ToString ( ) : string
Результат string

Описание свойств

autoCleanUpField защищенное свойство

Backing field for property. False unless the GameProperty is set to true (else it's not sent).
protected bool autoCleanUpField
Результат bool

maxPlayersField защищенное свойство

Backing field for property.
protected byte maxPlayersField
Результат byte

nameField защищенное свойство

Backing field for property.
protected string nameField
Результат string

openField защищенное свойство

Backing field for property.
protected bool openField
Результат bool

visibleField защищенное свойство

Backing field for property.
protected bool visibleField
Результат bool