2025-04-29 10:02:10 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
|
|
/// <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 10:15:45 +08:00
|
|
|
|
///// <summary>
|
|
|
|
|
|
///// 判断是否是元组属性
|
|
|
|
|
|
///// </summary>
|
|
|
|
|
|
///// <param name="propertyName"></param>
|
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
|
//bool IsTupleProperty(string propertyName);
|
2025-04-29 10:02:10 +08:00
|
|
|
|
|
2025-05-07 10:15:45 +08:00
|
|
|
|
///// <summary>
|
|
|
|
|
|
///// 获取元组属性值
|
|
|
|
|
|
///// </summary>
|
|
|
|
|
|
///// <param name="entity"></param>
|
|
|
|
|
|
///// <param name="tuplePropertyName"></param>
|
|
|
|
|
|
///// <returns></returns>
|
|
|
|
|
|
//(object Item1, object Item2) GetTupleParts(T entity, string tuplePropertyName);
|
2025-04-29 10:02:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|