コード例 #1
0
        /// <summary>
        /// 取消发送消息,目前用于取消发送文件消息
        /// </summary>
        /// <param name="message">消息体</param>
        /// <param name="action">附件上传进度回调</param>
        public static void StopSendMessage(NIMIMMessage message, ReportUploadProgressDelegate action = null)
        {
            System.Diagnostics.Debug.Assert(message != null);
            var    msg = message.Serialize();
            IntPtr ptr = IntPtr.Zero;

            if (action != null)
            {
                ptr = NimUtility.DelegateConverter.ConvertToIntPtr(action);
            }
            TalkNativeMethods.nim_talk_stop_send_msg(msg, null, UploadFileProgressChanged, ptr);
        }
コード例 #2
0
        /// <summary>
        /// 取消发送消息,目前用于取消发送文件消息
        /// </summary>
        /// <param name="message">消息体</param>
        /// <param name="action">附件上传进度回调</param>
        public static void StopSendMessage(NIMIMMessage message, ReportUploadProgressDelegate action = null)
        {
            var    msg = message.Serialize();
            IntPtr ptr = IntPtr.Zero;

            if (action != null)
            {
                NimUploadProgressData data = new NimUploadProgressData();
                data.Message        = message;
                data.ProgressAction = action;
                ptr = NimUtility.DelegateConverter.ConvertToIntPtr(data);
            }
            TalkNativeMethods.nim_talk_stop_send_msg(msg, null);
        }