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 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, SlatesResponse response, ApiStatus apiStatus = null) { int result = LiveModelRequestSlatesDecision(this.DangerousGetHandle(), eventId, contextJson, response.DangerousGetHandle(), apiStatus.ToNativeHandleOrNullptrDangerous()); GC.KeepAlive(this); return(result == NativeMethods.SuccessStatus); }