2025-04-29 10:02:10 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2025-05-07 17:27:37 +08:00
|
|
|
|
using System.Reflection;
|
2025-04-29 10:02:10 +08:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
2025-05-06 23:46:12 +08:00
|
|
|
|
namespace JiShe.CollectBus.Analyzers.Shared
|
2025-04-29 10:02:10 +08:00
|
|
|
|
{
|
2025-05-06 23:46:12 +08:00
|
|
|
|
public interface ISourceEntityAccessor<T>
|
2025-04-29 10:02:10 +08:00
|
|
|
|
{
|
2025-05-08 14:42:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 实体类名称
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
string EntityName { get; }
|
|
|
|
|
|
|
2025-05-08 17:21:20 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 实体类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
EntityTypeEnum? EntityType { get;}
|
|
|
|
|
|
|
2025-04-29 10:02:10 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取属性值
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity"></param>
|
|
|
|
|
|
/// <param name="propertyName"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
object GetPropertyValue(T entity, string propertyName);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设置属性值
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity"></param>
|
|
|
|
|
|
/// <param name="propertyName"></param>
|
|
|
|
|
|
/// <param name="value"></param>
|
|
|
|
|
|
void SetPropertyValue(T entity, string propertyName, object value);
|
|
|
|
|
|
|
2025-05-07 16:37:26 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 属性名称集合
|
|
|
|
|
|
/// </summary>
|
2025-05-07 17:27:37 +08:00
|
|
|
|
List<string> PropertyNameList { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 属性信息集合
|
|
|
|
|
|
/// </summary>
|
2025-05-08 11:17:43 +08:00
|
|
|
|
List<EntityMemberInfo> MemberList { get; }
|
2025-04-29 10:02:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|