SmartFoxServer Silverlight API
SFSEvent..::.OnRoomListUpdateDelegate Delegate
Namespaces ► SmartFoxClientAPI ► SFSEvent ► SFSEvent..::.OnRoomListUpdateDelegate
Dispatched when the list of rooms available in the current zone is received.
If the default login mechanism provided by SmartFoxServer is used, then this event is dispatched right after a successful login.
This is because the SmartFoxServer API, internally, call the GetRoomList()()() method after a successful login is performed.
If a custom login handler is implemented, the room list must be manually requested to the server by calling the mentioned method.
Declaration Syntax

C# | Visual Basic | Visual C++

    public delegate void OnRoomListUpdateDelegate(
    	Dictionary<int, Room> roomList
    )

    Public Delegate Sub OnRoomListUpdateDelegate ( _
    	roomList As Dictionary(Of Integer, Room) _
    )

    public delegate void OnRoomListUpdateDelegate(
    	Dictionary<int, Room^>^ roomList
    )

Parameters

roomList (Dictionary<(Of <(Int32, Room>)>))
  a list of Room objects for the zone logged in by the user.

Remarks

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to handle the list of rooms sent by SmartFoxServer.
CopyC#

    SFSEvent.onRoomListUpdate += OnRoomListUpdate;

    smartFox.Login("simpleChat", "jack");

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

See Also
Room
GetRoomList()()()

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