20240224
This commit is contained in:
parent
7e8f9d07ba
commit
ed8253e99b
23
anbs_cpfn/Classes/AppSettings.cs
Normal file
23
anbs_cpfn/Classes/AppSettings.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace anbs_cp.ForNet.Classes;
|
||||
|
||||
/// <summary>
|
||||
/// Класс-поддержки для доступа к файлу "appsettings.json" в любом месте сайта классах.
|
||||
/// Взято с: https://stackoverflow.com/a/69111159/16469671
|
||||
/// </summary>
|
||||
public static class AppSettings
|
||||
{
|
||||
// ReSharper disable once NotAccessedField.Global
|
||||
// ReSharper disable once NotNullOrRequiredMemberIsNotInitialized
|
||||
public static IConfiguration? Config { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Инициализация настроек. Она проводится в файле Program.cs.
|
||||
/// </summary>
|
||||
/// <param name="configuration">Параметры из "appsettings.json"</param>
|
||||
public static void Initialize (IConfiguration configuration)
|
||||
{
|
||||
Config = configuration;
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>ANBSoftware.ComponentsPackForNet</PackageId>
|
||||
<Version>2024.2.6.0</Version>
|
||||
<Version>2024.2.24.0</Version>
|
||||
<Authors>Александр Бабаев</Authors>
|
||||
<Product>Набор компонентов ANB Software для ASP.NET Core</Product>
|
||||
<Description>Библиотека полезных методов языка C# для ASP.NET Core</Description>
|
||||
@ -20,12 +20,12 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlSanitizer" Version="8.0.838" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.1" />
|
||||
<PackageReference Include="HtmlSanitizer" Version="8.0.843" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=abcdefghijkmnopqrstuvwxyz/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ABCDEFGHJKLMNOPQRSTUVWXYZ/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=anbs/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=C_0435_0440_0438_0430_043B_0438_0437_0430_0446_0438_044F/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Darkseal/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Encryptor/@EntryIndexedValue">True</s:Boolean>
|
||||
|
Loading…
x
Reference in New Issue
Block a user