public bool TryChooseRank(string eventId, string contextJson, RankingResponse response, ApiStatus apiStatus = null)
        {
            int result = LiveModelChooseRank(this.DangerousGetHandle(), eventId, contextJson, response.DangerousGetHandle(), apiStatus.ToNativeHandleOrNullptrDangerous());

            GC.KeepAlive(this);
            return(result == NativeMethods.SuccessStatus);
        }
            private static New <RankingResponseEnumerator> BindConstructorArguments(RankingResponse rankingResponse)
            {
                return(new New <RankingResponseEnumerator>(() =>
                {
                    IntPtr result = CreateRankingEnumeratorAdapter(rankingResponse.DangerousGetHandle());

                    GC.KeepAlive(rankingResponse); // Extend the lifetime of this handle because the delegate (and its data) is not stored on the heap.
                    return result;
                }));
            }
        public RankingResponse ChooseRank(string eventId, string contextJson, ActionFlags flags)
        {
            RankingResponse result = new RankingResponse();

            using (ApiStatus apiStatus = new ApiStatus())
                if (!this.TryChooseRank(eventId, contextJson, flags, result, apiStatus))
                {
                    throw new RLException(apiStatus);
                }

            return(result);
        }
 public bool TryChooseRank(string eventId, string contextJson, ActionFlags flags, out RankingResponse response, ApiStatus apiStatus = null)
 {
     response = new RankingResponse();
     return(this.TryChooseRank(eventId, contextJson, flags, response, apiStatus));
 }
Example #5
0
        public bool TryChooseRank(string actionId, string contextJson, RankingResponse response, ApiStatus apiStatus = null)
        {
            int result = LiveModelChooseRank(this.NativeHandle, actionId, contextJson, response.NativeHandle, apiStatus.ToNativeHandleOrNullptr());

            return(result == NativeMethods.SuccessStatus);
        }
Example #6
0
 public bool TryChooseRank(string actionId, string contextJson, out RankingResponse response, ApiStatus apiStatus = null)
 {
     response = new RankingResponse();
     return(this.TryChooseRank(actionId, contextJson, response, apiStatus));
 }
Example #7
0
 private static New <RankingResponseEnumerator> BindConstructorArguments(RankingResponse rankingResponse)
 {
     return(new New <RankingResponseEnumerator>(() => CreateRankingEnumeratorAdapter(rankingResponse.NativeHandle)));
 }
Example #8
0
 public RankingResponseEnumerator(RankingResponse rankingResponse) : base(BindConstructorArguments(rankingResponse), new Delete <RankingResponseEnumerator>(DeleteRankingEnumeratorAdapter))
 {
 }
        public bool TryChooseRank(string eventId, string contextJson, ActionFlags flags, RankingResponse response, ApiStatus apiStatus = null)
        {
            int result = LiveModelChooseRankWithFlags(this.NativeHandle, eventId, contextJson, (uint)flags, response.NativeHandle, apiStatus.ToNativeHandleOrNullptr());

            return(result == NativeMethods.SuccessStatus);
        }