Exemple #1
0
 bool ParticipationType(DbEventType type)
 {
     return(type == DbEventType.free_money || type == DbEventType.free_object || type == DbEventType.mail_only);
 }
Exemple #2
0
        /// <summary>
        /// 通过事件暴露内部的命令对象
        /// </summary>
        /// <remarks>由于大多数应用不会使用这个特性,出于性能优化的考虑,先把Delegate放在前面判断</remarks>
        /// <param name="command">内部的命令对象</param>
        /// <param name="eventType">数据访问调用时机类型</param>
        protected void DoDbEvent(IDbCommand command, DbEventType eventType)
        {
            //if (false == this.hasCustomizedDbEventArgs)
            //    return;

            if ((BeforeExecution != null) && (eventType == DbEventType.BeforeExecution))
                TriggerDbEvent(command, BeforeExecution);
            else if ((AfterExecution != null) && (eventType == DbEventType.AfterExecution))
                TriggerDbEvent(command, AfterExecution);
        }