SmartFoxServer Silverlight API
Room Class
NamespacesSmartFoxClientAPI.DataRoom
The Room class stores the properties of each server room.
This class is used internally by the SmartFoxClient class; also, Room objects are returned by various methods and events of the SmartFoxServer API.
Declaration Syntax
C#Visual BasicVisual C++
public class Room
Public Class Room
public ref class Room
Members
All MembersConstructorsMethods



IconMemberDescription
Room(Int32, String, Int32, Int32, Boolean, Boolean, Boolean, Boolean)
Initializes a new instance of the Room class

Room(Int32, String, Int32, Int32, Boolean, Boolean, Boolean, Boolean, Int32)
Initializes a new instance of the Room class

Room(Int32, String, Int32, Int32, Boolean, Boolean, Boolean, Boolean, Int32, Int32)
Room constructor.

AddUser(User, Int32)
Add a user to the room.

ClearUserList()()()
* Reset users list. *

ClearVariables()()()
* Reset Room Variables. *

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetId()()()
Get the id of the room.

GetMaxSpectators()()()
Retrieve the maximum number of spectators that can join the room.
Spectators can exist in game rooms only.

GetMaxUsers()()()
Retrieve the maximum number of users that can join the room.

GetMyPlayerIndex()()()
Retrieve the player id for the current user in the room.
This id is 1-based (player 1, player 2, etc.), but if the user is a spectator its value is -1.

GetName()()()
Get the name of the room.

GetSpectatorCount()()()
Retrieve the number of spectators currently inside the room.

GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
GetUser(Object)
Retrieve a user currently in the room.

GetUserCount()()()
Retrieve the number of users currently inside the room.

GetUserList()()()
Get the list of users currently inside the room.
As the returned list is a Dictionary with user id(s) as keys, in order to iterate it foreach loop should be used.

GetVariable(String)
Retrieve a Room Variable.

GetVariables()()()
Retrieve the list of all Room Variables.

IsGame()()()
A boolean flag indicating if the room is a "game room".

IsLimbo()()()
A boolean flag indicating if the room is in "limbo mode".

IsPrivate()()()
A boolean flag indicating if the room is private (password protected).

IsTemp()()()
A boolean flag indicating if the room is dynamic/temporary.
This is always true for rooms created at runtime on client-side.

MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
RemoveUser(Int32)
* Remove a user from the room. *

SetIsLimbo(Boolean)
* Set the isLimbo property. *

SetMyPlayerIndex(Int32)

Set the myPlayerId property.
Each room where the current client is connected contains a myPlayerId (if the room is a gameRoom).
myPlayerId == -1 ... user is a spectator
myPlayerId > 0 ... user is a player


SetSpectatorCount(Int32)
* See the number of spectators in the room. *

SetUserCount(Int32)
* See the number of users in the room. *

SetVariables(Dictionary<(Of <(String, Object>)>))
* Set the Room Variables. *

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Remarks

NOTE:
in the provided examples, room always indicates a Room instance.

Version:
1.0.0

Author:
Thomas Hentschel Lund
http://www.fullcontrol.dk
sfs-api@fullcontrol.dk

(c) 2008-2009 gotoAndPlay()
http://www.smartfoxserver.com
http://www.gotoandplay.it

Inheritance Hierarchy
Object
Room

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)