using NCC.Common.Extension; using NCC.Dependency; using System.Collections.Generic; using System.IO; using System.Linq; namespace NCC.Common.Configuration { /// /// Key常量 /// [SuppressSniffer] public class KeyVariable { /// /// 多租户模式 /// public static bool MultiTenancy { get { var flag = App.Configuration["NCC_App:MultiTenancy"]; return flag.ToBool(); } } /// /// 系统文件路径 /// public static string SystemPath { get { return string.IsNullOrEmpty(App.Configuration["NCC_App:SystemPath"]) ? Directory.GetCurrentDirectory() : App.Configuration["NCC_App:SystemPath"]; } } /// /// 命名空间 /// public static List AreasName { get { return string.IsNullOrEmpty(App.Configuration["NCC_APP:CodeAreasName"]) ? new List() : App.Configuration["NCC_APP:CodeAreasName"].Split(',').ToList(); } } /// /// 允许上传图片类型 /// public static List AllowImageType { get { return string.IsNullOrEmpty(App.Configuration["NCC_APP:AllowUploadImageType"]) ? new List() : App.Configuration["NCC_APP:AllowUploadImageType"].Split(',').ToList(); } } /// /// 允许上传文件类型 /// public static List AllowUploadFileType { get { return string.IsNullOrEmpty(App.Configuration["NCC_APP:AllowUploadFileType"]) ? new List() : App.Configuration["NCC_APP:AllowUploadFileType"].Split(',').ToList(); } } /// /// 微信允许上传文件类型 /// public static List WeChatUploadFileType { get { return string.IsNullOrEmpty(App.Configuration["NCC_APP:WeChatUploadFileType"]) ? new List() : App.Configuration["NCC_APP:WeChatUploadFileType"].Split(',').ToList(); } } /// /// MinIO桶 /// public static string BucketName { get { return string.IsNullOrEmpty(App.Configuration["NCC_APP:BucketName"]) ? "" : App.Configuration["NCC_APP:BucketName"]; } } /// /// 文件储存类型 /// public static string FileStoreType { get { return string.IsNullOrEmpty(App.Configuration["NCC_APP:FileStoreType"]) ? "local" : App.Configuration["NCC_APP:FileStoreType"]; } } } }