/// <summary> /// Changes the selected virtual servers configuration using given properties. /// </summary> /// <param name="serverModification">the properties as class</param> public SimpleResponse EditServer(VirtualServerModification serverModification) { if (serverModification == null) throw new ArgumentNullException("serverModification"); Command command = CommandName.ServerEdit.CreateCommand(); serverModification.AddToCommand(command); return ResponseBase<SimpleResponse>.Parse(SendCommand(command)); }
/// <summary> /// Creates a new virtual server using the given properties and displays its ID and initial administrator token. If /// virtualserver_port is not specified, the server will test for the first unused UDP port. /// The first virtual server will be running on UDP port 9987 by default. Subsequently started virtual servers will /// be running on increasing UDP port numbers. /// </summary> /// <param name="serverModification">the properties as class</param> public CreateServerResponse CreateServer(VirtualServerModification serverModification) { if (serverModification == null) throw new ArgumentNullException("serverModification"); //if (serverModification.Name.IsNullOrTrimmedEmpty()) // throw new ArgumentException("Name of the virtual server must be set!"); Command command = CommandName.Servercreate.CreateCommand(); serverModification.AddToCommand(command); return ResponseBase<CreateServerResponse>.Parse(SendCommand(command)); }