public bool TryRequestMultiSlotDecision(string eventId, string contextJson, ActionFlags flags, out MultiSlotResponse response, ApiStatus apiStatus) { response = new MultiSlotResponse(); GC.KeepAlive(this); return(this.TryRequestMultiSlotDecision(eventId, contextJson, flags, response, apiStatus)); }
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); }
public MultiSlotResponse RequestMultiSlotDecision(string eventId, string contextJson, ActionFlags flags) { MultiSlotResponse result = new MultiSlotResponse(); using (ApiStatus apiStatus = new ApiStatus()) if (!this.TryRequestMultiSlotDecision(eventId, contextJson, flags, result, apiStatus)) { throw new RLException(apiStatus); } return(result); }
public MultiSlotResponseEnumerator(MultiSlotResponse multiSlotResponse) : base(BindConstructorArguments(multiSlotResponse), new Delete <MultiSlotResponseEnumerator>(DeleteMultiSlotEnumeratorAdapter)) { }
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; })); }
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); }
public bool TryRequestMultiSlotDecision(string eventId, string contextJson, out MultiSlotResponse response, ApiStatus apiStatus = null) { response = new MultiSlotResponse(); return(this.TryRequestMultiSlotDecision(eventId, contextJson, response, apiStatus)); }