DeserializeOnlyJsonPropertyAttribute.cs 377 B

12345678910111213141516171819
  1. using System;
  2. namespace Masuit.Tools.Systems;
  3. /// <summary>
  4. /// 只允许反序列化
  5. /// </summary>
  6. [AttributeUsage(AttributeTargets.Property)]
  7. public class DeserializeOnlyJsonPropertyAttribute : Attribute
  8. {
  9. }
  10. /// <summary>
  11. /// 只允许序列化
  12. /// </summary>
  13. [AttributeUsage(AttributeTargets.Property)]
  14. public class SerializeOnlyJsonPropertyAttribute : Attribute
  15. {
  16. }