public void Set(CopyStatByIndexOptions other) { if (other != null) { m_ApiVersion = StatsInterface.CopystatbyindexApiLatest; TargetUserId = other.TargetUserId; StatIndex = other.StatIndex; } }
/// <summary> /// Fetches a stat from a given index. Use <see cref="Release" /> when finished with the data. /// <seealso cref="Release" /> /// </summary> /// <param name="options">Structure containing the Epic Online Services Account ID and index being accessed</param> /// <param name="outStat">The stat data for the given index, if it exists and is valid</param> /// <returns> /// <see cref="Result.Success" /> if the information is available and passed out in OutStat /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter /// <see cref="Result.NotFound" /> if the stat is not found /// </returns> public Result CopyStatByIndex(CopyStatByIndexOptions options, out Stat outStat) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <CopyStatByIndexOptionsInternal, CopyStatByIndexOptions>(ref optionsAddress, options); var outStatAddress = System.IntPtr.Zero; var funcResult = EOS_Stats_CopyStatByIndex(InnerHandle, optionsAddress, ref outStatAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <StatInternal, Stat>(outStatAddress, out outStat)) { EOS_Stats_Stat_Release(outStatAddress); } return(funcResult); }