using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; namespace SqlSugar { public class AopProvider { private AopProvider() { } public AopProvider(SqlSugarProvider context) { this.Context = context; this.Context.Ado.IsEnableLogEvent = true; } private SqlSugarProvider Context { get; set; } public Action OnDiffLogEvent { set { this.Context.CurrentConnectionConfig.AopEvents.OnDiffLogEvent = value; } } public Action OnError { set { this.Context.CurrentConnectionConfig.AopEvents.OnError = value; } } public Action OnLogExecuting { set { this.Context.CurrentConnectionConfig.AopEvents.OnLogExecuting= value; } } public Action OnLogExecuted { set { this.Context.CurrentConnectionConfig.AopEvents.OnLogExecuted = value; } } public Func> OnExecutingChangeSql { set { this.Context.CurrentConnectionConfig.AopEvents.OnExecutingChangeSql = value; } } public virtual Action DataExecuting { set { this.Context.CurrentConnectionConfig.AopEvents.DataExecuting = value; } } public Action DataChangesExecuted { set { this.Context.CurrentConnectionConfig.AopEvents.DataChangesExecuted = value; } } public virtual Action DataExecuted { set { this.Context.CurrentConnectionConfig.AopEvents.DataExecuted = value; } } public Action CheckConnectionExecuting { set { this.Context.CurrentConnectionConfig.AopEvents.CheckConnectionExecuting = value; } } public Action CheckConnectionExecuted { set { this.Context.CurrentConnectionConfig.AopEvents.CheckConnectionExecuted = value; } } public Action OnGetDataReadering { set { this.Context.CurrentConnectionConfig.AopEvents.OnGetDataReadering = value; } } public Action OnGetDataReadered { set { this.Context.CurrentConnectionConfig.AopEvents.OnGetDataReadered = value; } } } }