/// <summary> /// 表示 <see cref="Aoite.Data.DbEngineManager.Executed"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="result">操作的返回值。</param> /// <param name="command">执行的命令。</param> protected virtual void OnExecuted(IDbEngine engine, ExecuteType type, ExecuteCommand command, IDbResult result) { var handler = this.Executed; if (handler != null) { handler(engine, command.GetEventArgs(type, result)); } }
/// <summary> /// 表示 <see cref="Aoite.Data.DbEngineManager.Executing"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="command">执行的命令。</param> protected virtual void OnExecuting(IDbEngine engine, ExecuteType type, ExecuteCommand command) { var handler = this.Executing; if (handler != null) { handler(engine, command.GetEventArgs(type, null)); } }
/// <summary> /// 表示 <see cref="Aoite.Data.DbEngine.Executed"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="result">操作的返回值。</param> /// <param name="command">执行的命令。</param> protected virtual void OnExecuted(IDbEngine engine, ExecuteType type, ExecuteCommand command, IDbResult result) { if (this._Manager != null) { this._Manager.InternalOnExecuted(engine, type, command, result); } var handler = this.Executed; if (handler != null) { handler(engine, command.GetEventArgs(type, result)); } }
/// <summary> /// 表示 <see cref="Aoite.Data.DbEngine.Executing"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="command">执行的命令。</param> protected virtual void OnExecuting(IDbEngine engine, ExecuteType type, ExecuteCommand command) { if (this._Manager != null) { this._Manager.InternalOnExecuting(engine, type, command); } var handler = this.Executing; if (handler != null) { handler(engine, command.GetEventArgs(type, null)); } }
/// <summary> /// 表示 <see cref="Executed"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="result">操作的返回值。</param> /// <param name="command">执行的命令。</param> /// <param name="dbCommand">执行的 <see cref="DbCommand"/>。</param> internal protected virtual void OnExecuted(IDbEngine engine, ExecuteType type, ExecuteCommand command, DbCommand dbCommand, object result) => this.Executed?.Invoke(engine, command.GetEventArgs(type, dbCommand, result));
/// <summary> /// 表示 <see cref="Executing"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="command">执行的命令。</param> /// <param name="dbCommand">执行的 <see cref="DbCommand"/>。</param> internal protected virtual void OnExecuting(IDbEngine engine, ExecuteType type, ExecuteCommand command, DbCommand dbCommand) => this.Executing?.Invoke(engine, command.GetEventArgs(type, dbCommand, null));
/// <summary> /// 表示 <see cref="Executed"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="result">操作的返回值。</param> /// <param name="command">执行的命令。</param> /// <param name="dbCommand">执行的 <see cref="DbCommand"/>。</param> internal protected virtual void OnExecuted(IDbEngine engine, ExecuteType type, ExecuteCommand command, DbCommand dbCommand, object result) => this.Executed?.Invoke(engine, command.GetEventArgs(type, dbCommand, result));
/// <summary> /// 表示 <see cref="Executing"/> 事件的处理方法。 /// </summary> /// <param name="engine">数据源查询与交互引擎的实例。</param> /// <param name="type">执行的类型。</param> /// <param name="command">执行的命令。</param> /// <param name="dbCommand">执行的 <see cref="DbCommand"/>。</param> internal protected virtual void OnExecuting(IDbEngine engine, ExecuteType type, ExecuteCommand command, DbCommand dbCommand) => this.Executing?.Invoke(engine, command.GetEventArgs(type, dbCommand, null));