PropertiesNotMapped.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections.Generic;
  2. using System.Collections.ObjectModel;
  3. using System.Reflection;
  4. namespace Masuit.Tools.Mapping.Core
  5. {
  6. /// <summary>
  7. /// 未映射的属性的处理结果。
  8. /// </summary>
  9. public class PropertiesNotMapped
  10. {
  11. internal List<PropertyInfo> sourceProperties;
  12. internal List<PropertyInfo> targetProperties;
  13. /// <summary>
  14. /// 获取未映射的源属性。
  15. /// </summary>
  16. public ReadOnlyCollection<PropertyInfo> SourceProperties => new ReadOnlyCollection<PropertyInfo>(sourceProperties);
  17. /// <summary>
  18. /// 获取未映射的目标属性。
  19. /// </summary>
  20. public ReadOnlyCollection<PropertyInfo> TargetProperties => new ReadOnlyCollection<PropertyInfo>(targetProperties);
  21. /// <summary>
  22. /// 构造函数
  23. /// </summary>
  24. public PropertiesNotMapped()
  25. {
  26. sourceProperties = new List<PropertyInfo>();
  27. targetProperties = new List<PropertyInfo>();
  28. }
  29. }
  30. }