SmartFoxServer Silverlight API
GetRoomList Method
Namespaces ► SmartFoxClientAPI ► SmartFoxClient ► GetRoomList()()()
Retrieve the updated list of rooms in the current zone.
Unlike the GetAllRooms()()() method, this method sends a request to the server, which then sends back the complete list of rooms with all their properties and server-side variables (Room Variables).
If the default login mechanism provided by SmartFoxServer is used, then the updated list of rooms is received right after a successful login, without the need to call this method.
Instead, if a custom login handler is implemented, the room list must be manually requested to the server using this method.
Declaration Syntax

C# | Visual Basic | Visual C++

    public void GetRoomList()

    Public Sub GetRoomList

    public:
    void GetRoomList()

Remarks

Sends:
SFSEvent..::.OnRoomListUpdateDelegate

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to retrieve the room list from the server.
CopyC#

    SFSEvent.onRoomListUpdate += OnRoomListUpdate;

    smartFox.GetRoomList()

    public void OnRoomListUpdate(Dictionary<int, Room> roomList)
    {
        // Dump the names of the available rooms in the current zone
        foreach (Room room in roomList.Values)
            Debug.WriteLine(room.GetName());
    }

See Also
GetRoom(Int32)
GetRoomByName(String)
GetAllRooms()()()
SFSEvent..::.OnRoomListUpdateDelegate

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