Пример #1
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;
                }));
            }
Пример #2
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);
        }
Пример #3
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);
        }