示例#1
0
        private void Run_LiveModelRequestDecisionWithFlags_Test(LiveModel liveModel, string contextJson)
        {
            NativeMethods.LiveModelRequestDecisionWithFlagsOverride =
                (IntPtr liveModelPtr, IntPtr contextJsonPtr, uint flags, IntPtr rankingResponse, IntPtr ApiStatus) =>
            {
                string contextJsonMarshalledBack = NativeMethods.StringMarshallingFunc(contextJsonPtr);
                Assert.AreEqual(contextJson, contextJsonMarshalledBack, "Marshalling contextJson does not work properly in LiveModelRequestDecisionWithFlags");

                return(NativeMethods.SuccessStatus);
            };

            liveModel.RequestDecision(contextJson, ActionFlags.Deferred);
        }