forked from cyq1162/cyqdata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IAop.cs
49 lines (47 loc) · 1.52 KB
/
IAop.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Text;
namespace CYQ.Data.Aop
{
/// <summary>
/// Aop接口,需要实现时继承
/// </summary>
public interface IAop
{
/// <summary>
/// 方法调用之前被调用
/// </summary>
/// <param name="action">方法名称</param>
/// <param name="objName">表名/存储过程名/视图名/sql语句</param>
/// <param name="result">方法中可能返回的参数</param>
/// <param name="aopInfo">附带分支参数</param>
AopResult Begin(AopEnum action, AopInfo aopInfo);
/// <summary>
/// 方法调用之后被调用
/// </summary>
/// <param name="action">方法名称</param>
/// <param name="success">调用是否成功</param>
/// <param name="result">一般调用后的id[或MDataRow/MDataTable]</param>
/// <param name="aopInfo">附带分支参数</param>
void End(AopEnum action, AopInfo aopInfo);
/// <summary>
/// 数据库操作产生异常时,引发此方法
/// </summary>
/// <param name="msg"></param>
void OnError(string msg);
/// <summary>
/// 内部获取配置Aop,外部使用返回null即可。
/// </summary>
/// <returns></returns>
//IAop GetFromConfig();
/// <summary>
/// 克隆返回一个新的对象
/// </summary>
/// <returns></returns>
IAop Clone();
/// <summary>
/// Aop 首次加载时被触发的事件
/// </summary>
void OnLoad();
}
}