예제 #1
0
        public bool TryRequestSlatesDecision(string eventId, string contextJson, ActionFlags flags, out SlatesResponse response, ApiStatus apiStatus)
        {
            response = new SlatesResponse();

            GC.KeepAlive(this);
            return(this.TryRequestSlatesDecision(eventId, contextJson, flags, response, apiStatus));
        }
예제 #2
0
        public bool TryRequestSlatesDecision(string eventId, string contextJson, SlatesResponse response, ApiStatus apiStatus = null)
        {
            int result = LiveModelRequestSlatesDecision(this.DangerousGetHandle(), eventId, contextJson, response.DangerousGetHandle(), apiStatus.ToNativeHandleOrNullptrDangerous());

            GC.KeepAlive(this);
            return(result == NativeMethods.SuccessStatus);
        }
예제 #3
0
            private static New <SlatesResponseEnumerator> BindConstructorArguments(SlatesResponse slatesResponse)
            {
                return(new New <SlatesResponseEnumerator>(() =>
                {
                    IntPtr result = CreateSlatesEnumeratorAdapter(slatesResponse.DangerousGetHandle());

                    GC.KeepAlive(slatesResponse); // Extend the lifetime of this handle because the delegate (and its data) is not stored on the heap.
                    return result;
                }));
            }
예제 #4
0
        public SlatesResponse RequestSlatesDecision(string eventId, string contextJson, ActionFlags flags)
        {
            SlatesResponse result = new SlatesResponse();

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

            return(result);
        }
예제 #5
0
        public bool TryRequestSlatesDecision(string eventId, string contextJson, ActionFlags flags, SlatesResponse response, ApiStatus apiStatus)
        {
            int result = LiveModelRequestSlatesDecisionWithFlags(this.DangerousGetHandle(), eventId, contextJson, (uint)flags, response.DangerousGetHandle(), apiStatus.ToNativeHandleOrNullptrDangerous());

            return(result == NativeMethods.SuccessStatus);
        }
예제 #6
0
 public bool TryRequestSlatesDecision(string eventId, string contextJson, out SlatesResponse response, ApiStatus apiStatus = null)
 {
     response = new SlatesResponse();
     return(this.TryRequestSlatesDecision(eventId, contextJson, response, apiStatus));
 }
예제 #7
0
 public SlatesResponseEnumerator(SlatesResponse slatesResponse) : base(BindConstructorArguments(slatesResponse), new Delete <SlatesResponseEnumerator>(DeleteSlatesEnumeratorAdapter))
 {
 }