1
1

FallbackJsonProperty.cs 378 B

1234567891011121314
  1. using System;
  2. namespace Masuit.Tools.Systems;
  3. /// <summary>
  4. /// 多别名属性
  5. /// </summary>
  6. [AttributeUsage(AttributeTargets.Property)]
  7. public class FallbackJsonProperty(string preferredName, params string[] fallbackReadNames) : Attribute
  8. {
  9. public string PreferredName { get; } = preferredName;
  10. public string[] FallbackReadNames { get; } = fallbackReadNames;
  11. }