public void Perform() { var sendingContent = new ServerSetRoomAdminCommand.MessageContent { RoomName = _roomName, NewAdmin = _newAdmin }; ClientModel.Client.SendMessage(ServerSetRoomAdminCommand.CommandId, sendingContent); }
/// <summary> /// Изменяет администратора комнаты. /// </summary> /// <param name="roomName">Название комнаты.</param> /// <param name="newAdmin">Пользователь назначаемый администратором.</param> public void SetRoomAdmin(string roomName, User newAdmin) { if (string.IsNullOrEmpty(roomName)) { throw new ArgumentException("roomName"); } if (newAdmin == null) { throw new ArgumentNullException("newAdmin"); } var sendingContent = new ServerSetRoomAdminCommand.MessageContent { RoomName = roomName, NewAdmin = newAdmin }; ClientModel.Client.SendMessage(ServerSetRoomAdminCommand.Id, sendingContent); }
public void SetRoomAdmin(string roomName, User newAdmin) { if (string.IsNullOrEmpty(roomName)) throw new ArgumentException("roomName"); if (newAdmin == null) throw new ArgumentNullException("newAdmin"); var sendingContent = new ServerSetRoomAdminCommand.MessageContent { RoomName = roomName, NewAdmin = newAdmin }; ClientModel.Client.SendMessage(ServerSetRoomAdminCommand.CommandId, sendingContent); }