DeserializeOnlyJsonPropertyAttribute.cs 371 B

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