public static void WriteMsglogOnlyForTest(string uid, bool need_update_session, NIMIMMessage msg, string json_extension, OperateSingleLogResultDelegate action) { var ptr = DelegateConverter.ConvertToIntPtr(action); var msgJsonValue = msg.Serialize(); MsglogNativeMethods.nim_msglog_insert_msglog_async(uid, msgJsonValue, need_update_session, json_extension, OperateMsglogByLogIdCompleted, ptr); }