mirror of
https://github.com/Tribufu/TribufuDotNet
synced 2026-08-10 05:11:07 +00:00
Migrate to new tribufu project structure
This commit is contained in:
parent
be25ee8fe3
commit
6ef2762a64
114 changed files with 35 additions and 26 deletions
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Tribufu.Configuration.Extensions
|
||||
{
|
||||
public static class IConfigurationExtensions
|
||||
{
|
||||
public static string? Get(this IConfiguration configuration, string prefix, string key)
|
||||
{
|
||||
var section = configuration.GetSection(prefix);
|
||||
return !section.Exists() ? configuration[$"{prefix}_{key}"] : section[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue