SmartFoxServer Silverlight API
SFSEvent..::.OnRoomVariablesUpdateDelegate Delegate
NamespacesSmartFoxClientAPISFSEventSFSEvent..::.OnRoomVariablesUpdateDelegate
Dispatched when Room Variables are updated.
A user receives this notification only from the room(s) where he/she is currently logged in. Also, only the variables that changed are transmitted.
Declaration Syntax
C#Visual BasicVisual C++
public delegate void OnRoomVariablesUpdateDelegate(
	Room room,
	Dictionary<string, Object> changedVars
)
Public Delegate Sub OnRoomVariablesUpdateDelegate ( _
	room As Room, _
	changedVars As Dictionary(Of String, Object) _
)
public delegate void OnRoomVariablesUpdateDelegate(
	Room^ room, 
	Dictionary<String^, Object^>^ changedVars
)
Parameters
room (Room)
the Room object representing the room where the update took place.
changedVars (Dictionary<(Of <(String, Object>)>))
a dictionary with the names of the changed variables as keys.
Remarks

NOTE:
the changedVars array contains the names of the changed variables only, not the actual values. To retrieve them the GetVariable(String) / GetVariables()()() methods can be used.

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to handle an update in Room Variables.
CopyC#
SFSEvent.onRoomVariablesUpdate += OnRoomVariablesUpdate;

public void OnRoomVariablesUpdate(Room room, Dictionary<string, object> changedVars)
{
    // Iterate on the 'changedVars' Hashtable to check which variables were updated
    foreach (string v in changedVars.Keys)
        Debug.WriteLine(v + " room variable was updated; new value is: " + room.getVariable(v));
}
See Also

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