当前位置:网站首页>Configuring the help class iconfiguration in C # NETCORE
Configuring the help class iconfiguration in C # NETCORE
2022-06-27 05:45:00 【Sky watching house】
using System;
using System.IO;
namespace Microsoft.Extensions.Configuration;
public static class ConfigurationHelper
{
public static IConfigurationRoot BuildConfiguration(
AbpConfigurationBuilderOptions options = null,
Action<IConfigurationBuilder> builderAction = null)
{
options = options ?? new AbpConfigurationBuilderOptions();
if (options.BasePath.IsNullOrEmpty())
{
options.BasePath = Directory.GetCurrentDirectory();
}
var builder = new ConfigurationBuilder()
.SetBasePath(options.BasePath)
.AddJsonFile(options.FileName + ".json", optional: true, reloadOnChange: true);
if (!options.EnvironmentName.IsNullOrEmpty())
{
builder = builder.AddJsonFile($"{
options.FileName}.{
options.EnvironmentName}.json", optional: true, reloadOnChange: true);
}
if (options.EnvironmentName == "Development")
{
if (options.UserSecretsId != null)
{
builder.AddUserSecrets(options.UserSecretsId);
}
else if (options.UserSecretsAssembly != null)
{
builder.AddUserSecrets(options.UserSecretsAssembly, true);
}
}
builder = builder.AddEnvironmentVariables(options.EnvironmentVariablesPrefix);
if (options.CommandLineArgs != null)
{
builder = builder.AddCommandLine(options.CommandLineArgs);
}
builderAction?.Invoke(builder);
return builder.Build();
}
}
边栏推荐
- 躲避小行星游戏
- Nlp-d62-nlp competition d31 & question brushing D15
- Spark 之 built-in functions
- Webrtc series - Nomination and ice of 7-ice supplement for network transmission_ Model
- Machunmei, the first edition of principles and applications of database... Compiled final review notes
- neo4j数据库导出
- 洛谷P4683 [IOI2008] Type Printer 题解
- How pychart installs packages
- AcWing 第 57 场周赛---BC题挺好
- Neo4j database export
猜你喜欢

Quick sort (non recursive) and merge sort

Codeforces Round #802 (Div. 2)

Experience oceanbase database under win10

NLP-D62-nlp比赛D31&刷题D15

双位置继电器XJLS-8G/220

Open the door small example to learn ten use case diagrams
![[FPGA] realize the data output of checkerboard horizontal and vertical gray scale diagram based on bt1120 timing design](/img/80/c258817abd35887c0872a3286a821f.png)
[FPGA] realize the data output of checkerboard horizontal and vertical gray scale diagram based on bt1120 timing design

双位置继电器RXMD2-1MRK001984 DC220V

Double position relay rxmd2-1mrk001984 dc220v

Wechat applet websocket use case
随机推荐
neo4j图数据库基本概念
Leetcode298 weekly race record
310. 最小高度树
微信小程序WebSocket使用案例
WebRTC系列-網絡傳輸之7-ICE補充之提名(nomination)與ICE_Model
Experience oceanbase database under win10
齐纳二极管 稳压二极管 SOD123封装 正负区分
Webrtc Series - Network Transport 7 - ice Supplement nominations and ice Modèle
双位置继电器DLS-34A DC0.5A 220VDC
Web3还没实现,Web5乍然惊现!
Formation and release of function stack frame
Double position relay rxmd2-1mrk001984 dc220v
论文解读(LG2AR)《Learning Graph Augmentations to Learn Graph Representations》
IAR systems fully supports Centrino technology 9 series chips
RTP sending PS stream tool (open source)
Some articles about component packaging and my experience
【FPGA】UART串口_V1.1
Mechanical transcoding journal [17] template, STL introduction
数据库-索引
QListWidgetItem上附加widget