XFEExtension
【DLL】XFE各类拓展是一个C#的DLL库,旨在优化C#代码中常用语句的使用,并提供更简洁的访问方式,同时提供Xunit测试框架,快速搭建服务器/客户端,免费ChatGPTAPI接口,免费通讯服务器,XFE下载器,新增格式等
关注
0
Fork
0
Star
0
返回提交历史
Modified
XFE各类拓展.NetCore/ProfileExtension/ProfileInfo.cs
+1
-1
Modified
XFE各类拓展.NetCore/ProfileExtension/XFEProfile.cs
+4
-1
XFEstudio/XFEExtension
XFE配置文件新增配置文件根目录
ef42654
代码差异
2 个文件
+5
-2
@@ -17,7 +17,7 @@ public class ProfileInfo(Type profileType, string path = "", string description
17
17
/// <summary>
18
18
/// 配置文件储存位置
19
19
/// </summary>
20
public string Path { get; init; } = path == "" ? $"Profile/{profileType.Name}.xfe" : path;
20
public string Path { get; init; } = path == "" ? $"{((XFEProfile.ProfilesRootPath[^1] == '/' || XFEProfile.ProfilesRootPath[^1] == '\\') ? $"{XFEProfile.ProfilesRootPath}{profileType.Name}.xfe" : $"{XFEProfile.ProfilesRootPath}/{profileType.Name}.xfe")}" : path;
21
21
/// <summary>
22
22
/// 配置文件描述
23
23
/// </summary>
@@ -1,5 +1,4 @@
1
1
using XFE各类拓展.NetCore.FormatExtension;
2
using static System.Runtime.InteropServices.JavaScript.JSType;
3
2
4
3
namespace XFE各类拓展.NetCore.ProfileExtension;
5
4
@@ -13,6 +12,10 @@ public abstract class XFEProfile
13
12
/// </summary>
14
13
public static List<ProfileInfo> Profiles { get; private set; } = [];
15
14
/// <summary>
15
/// 配置文件所在的根目录
16
/// </summary>
17
public static string ProfilesRootPath { get; set; } = $"{AppDomain.CurrentDomain.BaseDirectory}/Profiles";
18
/// <summary>
16
19
/// 加载配置文件
17
20
/// </summary>
18
21
/// <param name="profileInfo"></param>