コード例 #1
0
        internal static void OnQueryStatsComplete(IntPtr address)
        {
            OnQueryStatsCompleteCallback     callback     = null;
            OnQueryStatsCompleteCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnQueryStatsCompleteCallback, OnQueryStatsCompleteCallbackInfoInternal, OnQueryStatsCompleteCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
コード例 #2
0
        /// <summary>
        /// Query for a list of stats for a specific player.
        /// </summary>
        /// <param name="options">Structure containing information about the player whose stats we're retrieving.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">This function is called when the query player stats operation completes.</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the operation completes successfully
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// </returns>
        public void QueryStats(QueryStatsOptions options, object clientData, OnQueryStatsCompleteCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <QueryStatsOptionsInternal>(options);

            var completionDelegateInternal = new OnQueryStatsCompleteCallbackInternal(OnQueryStatsComplete);
            var clientDataAddress          = IntPtr.Zero;

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

            EOS_Stats_QueryStats(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
コード例 #3
0
        /// <summary>
        /// Query for a list of stats for a specific player.
        /// </summary>
        /// <param name="options">Structure containing information about the player whose stats we're retrieving.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">This function is called when the query player stats operation completes.</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the operation completes successfully
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// <see cref="Result.InvalidUser" /> if target user ID is missing or incorrect
        /// </returns>
        public void QueryStats(QueryStatsOptions options, object clientData, OnQueryStatsCompleteCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryStatsOptionsInternal, QueryStatsOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryStatsCompleteCallbackInternal(OnQueryStatsCompleteCallbackInternalImplementation);

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

            EOS_Stats_QueryStats(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }