Exemple #1
0
        /// <summary>
        /// 执行上下文被移除的事件
        /// 注意:此事件不是实时触发的,而是等过期后任意一个人发过来的下一条消息执行之前触发。
        /// </summary>
        /// <param name="e"></param>
        private void OnMessageContextRemoved(WeixinContextRemovedEventArgs <TRequest, TResponse> e)
        {
            EventHandler <WeixinContextRemovedEventArgs <TRequest, TResponse> > temp = MessageContextRemoved;

            if (temp != null)
            {
                temp(this, e);
            }
        }
Exemple #2
0
        /// <summary>
        /// 此上下文被清除的时候触发
        /// </summary>
        public virtual void OnRemoved()
        {
            var onRemovedArg = new WeixinContextRemovedEventArgs <TRequest, TResponse>(this);

            OnMessageContextRemoved(onRemovedArg);
        }