ChangeRoomCapacityRequest Class |
Namespace: Sfs2X.Requests
public class ChangeRoomCapacityRequest : BaseRequest
The ChangeRoomCapacityRequest type exposes the following members.
Name | Description | |
---|---|---|
ChangeRoomCapacityRequest |
Creates a new ChangeRoomCapacityRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.ROOM_CAPACITY_CHANGE, OnRoomCapacityChange); sfs.AddEventListener(SFSEvent.ROOM_CAPACITY_CHANGE_ERROR, OnRoomCapacityChangeError); Room theRoom = sfs.GetRoomByName("Gonzo's Room"); // Resize the Room so that it allows a maximum of 100 users and zero spectators sfs.Send( new ChangeRoomCapacityRequest(theRoom, 100, 0) ); } void OnRoomCapacityChange(BaseEvent evt) { Room room = (Room)evt.Params["room"]; Console.WriteLine("The capacity of Room " + room.Name + " was changed successfully"); // .Net / Unity System.Diagnostics.Debug.WriteLine("The capacity of Room " + room.Name + " was changed successfully"); // UWP } void OnRoomCapacityChangeError(BaseEvent evt) { Console.WriteLine("Room capacity change failed: " + (string)evt.Params["errorMessage"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Room capacity change failed: " + (string)evt.Params["errorMessage"]); // UWP }