PrivateBox/PrivateBox/AppConfig.cs
2025-10-24 09:54:44 +08:00

23 lines
583 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Configuration;
namespace PrivateBox
{
/// <summary>
/// 应用配置
/// </summary>
public class AppConfig
{
/// <summary>
/// 获取配置值
/// </summary>
/// <param name="key">配置的键</param>
/// <returns>配置值默认string.Empty</returns>
public string GetValue(string key) => ConfigurationManager.AppSettings[key] ?? string.Empty;
/// <summary>
/// sqliteFile名
/// </summary>
public string SqliteFileName => GetValue("sqliteFile") ?? "";
}
}