You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
835 B

4 years ago
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Reflection;
  5. using System.Text;
  6. namespace Apewer
  7. {
  8. /// <summary>使用 Json.Parse 方法将实例转为 Json 的检查器。</summary>
  9. /// <remarks>当实例实现 IToJson 时,此接口中的方法可能无效。</remarks>
  10. public interface IToJsonChecker
  11. {
  12. /// <summary>转换为 Json 时,包含此元素。</summary>
  13. public bool WithItemInJson(IList list, object item);
  14. /// <summary>转换为 Json 时,包含此元素。</summary>
  15. public bool WithPropertyInJson(object entity, PropertyInfo property, object value);
  16. /// <summary>转换为 Json 时,包含此元素。</summary>
  17. public bool WithPropertyInJson(IDictionary dictionary, string key, object value);
  18. }
  19. }