ChangeRoomPasswordStateRequest Class |
Namespace: Sfs2X.Requests
public class ChangeRoomPasswordStateRequest : BaseRequest
The ChangeRoomPasswordStateRequest type exposes the following members.
Name | Description | |
---|---|---|
ChangeRoomPasswordStateRequest |
Creates a new ChangeRoomPasswordStateRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.ROOM_PASSWORD_STATE_CHANGE, OnRoomPasswordStateChange); sfs.AddEventListener(SFSEvent.ROOM_PASSWORD_STATE_CHANGE_ERROR, OnRoomPasswordStateChangeError); Room theRoom = sfs.GetRoomByName("Gonzo's Room"); sfs.Send( new ChangeRoomPasswordStateRequest(theRoom, "mammamia") ); } void OnRoomPasswordStateChange(BaseEvent evt) { Room theRoom = (Room)evt.Params["room"]; Console.WriteLine("The password of Room " + theRoom.Name + " was changed successfully"); // .Net / Unity System.Diagnostics.Debug.WriteLine("The password of Room " + theRoom.Name + " was changed successfully"); // UWP } void OnRoomPasswordStateChangeError(BaseEvent evt) { Console.WriteLine("Room password change failed: " + (string)evt.Params["errorMessage"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Room password change failed: " + (string)evt.Params["errorMessage"]); // UWP }