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));
 }
Exemplo n.º 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);
        }
Exemplo n.º 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));
 }
Exemplo n.º 7
0
 private static New <RankingResponseEnumerator> BindConstructorArguments(RankingResponse rankingResponse)
 {
     return(new New <RankingResponseEnumerator>(() => CreateRankingEnumeratorAdapter(rankingResponse.NativeHandle)));
 }
Exemplo n.º 8
0
 public RankingResponseEnumerator(RankingResponse rankingResponse) : base(BindConstructorArguments(rankingResponse), new Delete <RankingResponseEnumerator>(DeleteRankingEnumeratorAdapter))
 {
 }
Exemplo n.º 9
0
        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);
        }