RuoVea.ExConfig 8.0.0.1

dotnet add package RuoVea.ExConfig --version 8.0.0.1
                    
NuGet\Install-Package RuoVea.ExConfig -Version 8.0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RuoVea.ExConfig" Version="8.0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RuoVea.ExConfig" Version="8.0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="RuoVea.ExConfig" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RuoVea.ExConfig --version 8.0.0.1
                    
#r "nuget: RuoVea.ExConfig, 8.0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=RuoVea.ExConfig&version=8.0.0.1
                    
Install RuoVea.ExConfig as a Cake Addin
#tool nuget:?package=RuoVea.ExConfig&version=8.0.0.1
                    
Install RuoVea.ExConfig as a Cake Tool

RuoVea.ExConfig

介绍

配置文件获取帮助类库

1.快速入门

通过Nuget安装组件

Install-Package RuoVea.ExConfig

使用方式一、

不需要注入直接使用
    
AppSettings.app("keyName");

使用方式二、

new AppSettings((IConfigurationBuilder)=>{ });

使用示例

 直接使用
    var getValue = RuoVea.ExConfig.AppSettings.GetValue("demo")

相关配置文件说明

获取自定义配置扫描目录 存放在如下任一文件夹

ConfigurationFiles

Configuration

Config

ScanDirectories

读取忽略的配置文件 存放在如下任一文件夹

IgnoreConfigurationFiles

IgnoreConfiguration

IgnoreConfig

IgnoreDirectories

更多方法

 /// <summary>
 /// 封装要操作的字符
 /// </summary>
 /// <param name="sections">节点配置</param>
 /// <returns></returns>
 AppSettings.app(params string[] sections)
     
 /// <summary>
 /// 递归获取配置信息数组
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="sections"></param>
 /// <returns></returns>
 AppSettings.app<T>(params string[] sections)
    
 /// <summary>
 /// 获取配置
 /// </summary>
 /// <param name="key">key</param>
 /// <returns>IConfigurationSection</returns>
 AppSettings.GetSection(string key)
    
 /// <summary>
 /// 封装要操作的字符
 /// </summary>
 /// <param name="sections"></param>
 /// <returns>object</returns>
 AppSettings.GetValue(params string[] sections)
     
 /// <summary>
 /// 获取配置
 /// </summary>
 /// <typeparam name="T">强类型选项类</typeparam>
 /// <param name="path">配置中对应的Key</param>
 /// <param name="loadPostConfigure"></param>
 /// <returns>TOptions</returns>
 AppSettings.GetConfig<T>(string path, bool loadPostConfigure = false)
    
 /// <summary>
 /// 获取配置
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="key"></param>
 /// <returns>T</returns>
 AppSettings.GetAppSettings<T>(string key) where T : class, new()
     
 /// <summary>
 /// 数据库链接字符串
 /// </summary>
 /// <param name="keyName"></param>
 /// <returns>string</returns>
 AppSettings.ConnectionStrings(String keyName)
 
   

2、通用帮助大类ConfigUtil

ConfigUtil.GetJsonConfig()

ConfigUtil.GetXmlConfig()

ConfigUtil.GetIniConfig()

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on RuoVea.ExConfig:

Package Downloads
RuoVea.ExFilter

注入 进行全局的异常日志收集、执行操作日志、参数验证,支持简体中文、繁体中文、粤语、日语、法语、英语. services.ExceptionSetup();// 注入 全局错误日志处 services.ExceptionSetup(ExceptionLog actionOptions);// 注入 全局错误日志处 services.ExceptionSetup(builder.Configuration.GetSection("AopOption:ExceptionLog"));// 注入 全局错误日志处 services.RequestActionSetup();// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(RequestLog actionOptions);// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(builder.Configuration.GetSection("AopOption:RequestLog"));// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.ResourceSetup();//对资源型信息进行过滤 services.ResultSetup();//对结果进行统一 services.ApISafeSetup(AppSign actionOptions);//接口安全校验 services.ApISafeSetup(builder.Configuration.GetSection("AopOption:AppSign"));//接口安全校验 services.ApISignSetup(AppSign actionOptions);//签名验证 ( appKey + signKey + timeStamp + data ); services.ApISignSetup(builder.Configuration.GetSection("AopOption:AppSign"));//签名验证 ( appKey + signKey + timeStamp + data ); services.AddValidateSetup();//模型校验 services.AddUiFilesZipSetup();//将前端UI压缩文件进行解压 不进行接口安全校验 -> NonAplSafeAttribute 不签名验证 -> NonAplSignAttribute 不进行全局的异常日志收集 -> NonExceptionAttribute 不对资源型信息进行过滤 -> NonResourceAttribute 不对结果进行统一 -> NonRestfulResultAttribute

RuoVea.ExCache

Redis缓存 内存缓存

RuoVea.ExJwtBearer

Jwt 授权验证拓展插件。声名:IJwtHelper _jwtHelper,支持简体中文、繁体中文、粤语、日语、法语、英语. 添加验权:services.AddAuthenticationSetup(enableGlobalAuthorize: true); 添加鉴权:services.AddAuthorizationSetup.MyPermission.(enableGlobalAuthorize: true); 添加Jwt加密:services.AddJwtSetup();

RuoVea.ExWeb

CorsUrls、IPLimit、SafeIps、Jwt 配置

RuoVea.ExGlobal

web 注入 全局错误日志、操作日志记录

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.0.1 339 4/23/2025
8.0.0 1,207 3/12/2024
7.0.0.1 386 4/23/2025
7.0.0 1,393 3/12/2024
6.0.1.7 448 4/23/2025
6.0.1.6 6,002 3/12/2024
6.0.1.5 141 3/12/2024
6.0.1.4 129 3/12/2024
6.0.1.3 600 1/26/2024
6.0.1.2 131 1/26/2024
6.0.1.1 759 11/19/2023
6.0.1 5,424 2/16/2022
6.0.0 4,683 2/9/2022
5.0.19.2 215 4/23/2025
5.0.19.1 440 8/28/2024
5.0.19 849 3/22/2022
5.0.8 1,193 11/19/2021
5.0.7 2,489 11/5/2021
5.0.6 595 11/4/2021
5.0.5 1,786 10/1/2021
5.0.4 1,297 9/30/2021
5.0.2 1,443 9/27/2021
5.0.1 370 9/27/2021
5.0.0 508 9/26/2021