private static New <MultiSlotResponseEnumerator> BindConstructorArguments(MultiSlotResponse multiSlotResponse)
            {
                return(new New <MultiSlotResponseEnumerator>(() =>
                {
                    IntPtr result = CreateMultiSlotEnumeratorAdapter(multiSlotResponse.DangerousGetHandle());

                    GC.KeepAlive(multiSlotResponse); // Extend the lifetime of this handle because the delegate (and its data) is not stored on the heap.
                    return result;
                }));
            }
Beispiel #2
0
        public bool TryRequestMultiSlotDecision(string eventId, string contextJson, ActionFlags flags, MultiSlotResponse response, ApiStatus apiStatus)
        {
            int result = LiveModelRequestMultiSlotDecisionWithFlags(this.DangerousGetHandle(), eventId, contextJson, (uint)flags, response.DangerousGetHandle(), apiStatus.ToNativeHandleOrNullptrDangerous());

            return(result == NativeMethods.SuccessStatus);
        }
Beispiel #3
0
        public bool TryRequestMultiSlotDecision(string eventId, string contextJson, MultiSlotResponse response, ApiStatus apiStatus = null)
        {
            int result = LiveModelRequestMultiSlotDecision(this.DangerousGetHandle(), eventId, contextJson, response.DangerousGetHandle(), apiStatus.ToNativeHandleOrNullptrDangerous());

            GC.KeepAlive(this);
            return(result == NativeMethods.SuccessStatus);
        }