public void Set(LobbyDetailsInfo other) { if (other != null) { m_ApiVersion = LobbyDetails.LobbydetailsInfoApiLatest; LobbyId = other.LobbyId; LobbyOwnerUserId = other.LobbyOwnerUserId; PermissionLevel = other.PermissionLevel; AvailableSlots = other.AvailableSlots; MaxMembers = other.MaxMembers; AllowInvites = other.AllowInvites; } }
/// <summary> /// <see cref="CopyInfo" /> is used to immediately retrieve a copy of lobby information from a given source such as a existing lobby or a search result. /// If the call returns an <see cref="Result.Success" /> result, the out parameter, OutLobbyDetailsInfo, must be passed to <see cref="Release" /> to release the memory associated with it. /// <seealso cref="LobbyDetailsInfo" /> /// <seealso cref="LobbyDetailsCopyInfoOptions" /> /// <seealso cref="Release" /> /// </summary> /// <param name="options">Structure containing the input parameters</param> /// <param name="outLobbyDetailsInfo">Out parameter used to receive the <see cref="LobbyDetailsInfo" /> structure.</param> /// <returns> /// <see cref="Result.Success" /> if the information is available and passed out in OutLobbyDetailsInfo /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter /// <see cref="Result.IncompatibleVersion" /> if the API version passed in is incorrect /// </returns> public Result CopyInfo(LobbyDetailsCopyInfoOptions options, out LobbyDetailsInfo outLobbyDetailsInfo) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <LobbyDetailsCopyInfoOptionsInternal, LobbyDetailsCopyInfoOptions>(ref optionsAddress, options); var outLobbyDetailsInfoAddress = System.IntPtr.Zero; var funcResult = EOS_LobbyDetails_CopyInfo(InnerHandle, optionsAddress, ref outLobbyDetailsInfoAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <LobbyDetailsInfoInternal, LobbyDetailsInfo>(outLobbyDetailsInfoAddress, out outLobbyDetailsInfo)) { EOS_LobbyDetails_Info_Release(outLobbyDetailsInfoAddress); } return(funcResult); }