refactor: ♻️ 2.0 (#3)

This commit is contained in:
2023-12-14 15:03:07 +08:00
committed by GitHub
parent 8c0dbcf1f4
commit cf2988b389
73 changed files with 1157 additions and 371 deletions

View File

@ -0,0 +1,26 @@
namespace NSExt.Attributes;
/// <summary>
/// 指定本地化资源类型
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Field)]
public sealed class LocalizationAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="LocalizationAttribute" /> class.
/// </summary>
#pragma warning disable IDE0290
public LocalizationAttribute(Type resourceClass)
#pragma warning restore IDE0290
{
ResourceClass = resourceClass;
}
/// <summary>
/// Gets or sets 资源类型
/// </summary>
/// <value>
/// 资源类型
/// </value>
public Type ResourceClass { get; set; }
}