public void Set(CopyExternalUserInfoByAccountIdOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = UserInfoInterface.CopyexternaluserinfobyaccountidApiLatest;
         LocalUserId  = other.LocalUserId;
         TargetUserId = other.TargetUserId;
         AccountId    = other.AccountId;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Fetches an external user info for a given external account ID.
        /// <seealso cref="Release" />
        /// </summary>
        /// <param name="options">Structure containing the account ID being accessed</param>
        /// <param name="outExternalUserInfo">The external user info. If it exists and is valid, use <see cref="Release" /> when finished</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the information is available and passed out in OutExternalUserInfo
        /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
        /// <see cref="Result.NotFound" /> if the external user info is not found
        /// </returns>
        public Result CopyExternalUserInfoByAccountId(CopyExternalUserInfoByAccountIdOptions options, out ExternalUserInfo outExternalUserInfo)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <CopyExternalUserInfoByAccountIdOptionsInternal, CopyExternalUserInfoByAccountIdOptions>(ref optionsAddress, options);

            var outExternalUserInfoAddress = System.IntPtr.Zero;

            var funcResult = EOS_UserInfo_CopyExternalUserInfoByAccountId(InnerHandle, optionsAddress, ref outExternalUserInfoAddress);

            Helper.TryMarshalDispose(ref optionsAddress);

            if (Helper.TryMarshalGet <ExternalUserInfoInternal, ExternalUserInfo>(outExternalUserInfoAddress, out outExternalUserInfo))
            {
                EOS_UserInfo_ExternalUserInfo_Release(outExternalUserInfoAddress);
            }

            return(funcResult);
        }