public void Set(CopyUserInfoOptions other) { if (other != null) { m_ApiVersion = UserInfoInterface.CopyuserinfoApiLatest; LocalUserId = other.LocalUserId; TargetUserId = other.TargetUserId; } }
/// <summary> /// <see cref="CopyUserInfo" /> is used to immediately retrieve a copy of user information based on an Epic Online Services Account ID, cached by a previous call to <see cref="QueryUserInfo" />. /// If the call returns an <see cref="Result.Success" /> result, the out parameter, OutUserInfo, must be passed to <see cref="Release" /> to release the memory associated with it. /// <seealso cref="UserInfoData" /> /// <seealso cref="CopyUserInfoOptions" /> /// <seealso cref="Release" /> /// </summary> /// <param name="options">structure containing the input parameters</param> /// <param name="outUserInfo">out parameter used to receive the <see cref="UserInfoData" /> structure.</param> /// <returns> /// <see cref="Result.Success" /> if the information is available and passed out in OutUserInfo /// <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 /// <see cref="Result.NotFound" /> if the user info is not locally cached. The information must have been previously cached by a call to <see cref="QueryUserInfo" /> /// </returns> public Result CopyUserInfo(CopyUserInfoOptions options, out UserInfoData outUserInfo) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <CopyUserInfoOptionsInternal, CopyUserInfoOptions>(ref optionsAddress, options); var outUserInfoAddress = System.IntPtr.Zero; var funcResult = EOS_UserInfo_CopyUserInfo(InnerHandle, optionsAddress, ref outUserInfoAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <UserInfoDataInternal, UserInfoData>(outUserInfoAddress, out outUserInfo)) { EOS_UserInfo_Release(outUserInfoAddress); } return(funcResult); }