public void Set(QueryStatsOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = StatsInterface.QuerystatsApiLatest;
         LocalUserId  = other.LocalUserId;
         StartTime    = other.StartTime;
         EndTime      = other.EndTime;
         StatNames    = other.StatNames;
         TargetUserId = other.TargetUserId;
     }
 }
예제 #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
        /// <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);
        }