internal static void OnQueryUserInfo(IntPtr address)
        {
            OnQueryUserInfoCallback   callback     = null;
            QueryUserInfoCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnQueryUserInfoCallback, QueryUserInfoCallbackInfoInternal, QueryUserInfoCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
        /// <summary>
        /// <see cref="QueryUserInfo" /> is used to start an asynchronous query to retrieve information, such as display name, about another account.
        /// Once the callback has been fired with a successful ResultCode, it is possible to call <see cref="CopyUserInfo" /> to receive an <see cref="UserInfoData" /> containing the available information.
        /// <seealso cref="UserInfoData" />
        /// <seealso cref="CopyUserInfo" />
        /// <seealso cref="QueryUserInfoOptions" />
        /// <seealso cref="OnQueryUserInfoCallback" />
        /// </summary>
        /// <param name="options">structure containing the input parameters</param>
        /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
        public void QueryUserInfo(QueryUserInfoOptions options, object clientData, OnQueryUserInfoCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <QueryUserInfoOptionsInternal>(options);

            var completionDelegateInternal = new OnQueryUserInfoCallbackInternal(OnQueryUserInfo);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_UserInfo_QueryUserInfo(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
Пример #3
0
        /// <summary>
        /// <see cref="QueryUserInfo" /> is used to start an asynchronous query to retrieve information, such as display name, about another account.
        /// Once the callback has been fired with a successful ResultCode, it is possible to call <see cref="CopyUserInfo" /> to receive an <see cref="UserInfoData" /> containing the available information.
        /// <seealso cref="UserInfoData" />
        /// <seealso cref="CopyUserInfo" />
        /// <seealso cref="QueryUserInfoOptions" />
        /// <seealso cref="OnQueryUserInfoCallback" />
        /// </summary>
        /// <param name="options">structure containing the input parameters</param>
        /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">a callback that is fired when the async operation completes, either successfully or in error</param>
        public void QueryUserInfo(QueryUserInfoOptions options, object clientData, OnQueryUserInfoCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryUserInfoOptionsInternal, QueryUserInfoOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryUserInfoCallbackInternal(OnQueryUserInfoCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_UserInfo_QueryUserInfo(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }