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));
        }
        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;
                }));
            }
        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);
        }
        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);
        }
 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))
 {
 }