- 增加 Aop.AuditDataReader 参数属性 PropertyInfo,实现自定义拦截;

This commit is contained in:
2881099
2023-10-18 20:25:03 +08:00
parent a3cb3d37df
commit 5782d6e517
5 changed files with 131 additions and 28 deletions

View File

@ -360,10 +360,11 @@ namespace FreeSql.Aop
#region AuditDataReader
public class AuditDataReaderEventArgs : EventArgs
{
public AuditDataReaderEventArgs(DbDataReader dataReader, int index)
public AuditDataReaderEventArgs(DbDataReader dataReader, int index, PropertyInfo property)
{
this.DataReader = dataReader;
this.Index = index;
this.Property = property;
}
/// <summary>
@ -375,6 +376,10 @@ namespace FreeSql.Aop
/// </summary>
public int Index { get; }
/// <summary>
/// DataReader 对应的 PropertyInfo
/// </summary>
public PropertyInfo Property { get; }
/// <summary>
/// 获取 Index 对应的值,也可以设置拦截的新值
/// </summary>
public object Value