XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.AutoPath

【DLL】自动路径创建工具,自动创建不存在的文件夹,对路径统一管理

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFEExtension.NetCore.AutoPath;

/// <summary>
/// 自动检测并生成对应文件夹
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public sealed class AutoPathAttribute : Attribute
{
    /// <summary>
    /// 生成的属性名称
    /// </summary>
    public string? PropertyName { get; set; }
    /// <summary>
    /// 自动检测并生成对应文件夹
    /// </summary>
    public AutoPathAttribute()
    {
    }
    /// <summary>
    /// 自动检测并生成对应文件夹
    /// </summary>
    /// <param name="propertyName"></param>
    public AutoPathAttribute(string propertyName)
    {
        PropertyName = propertyName;
    }
}