Update App Configurations ...

This commit is contained in:
2026-11-15 21:25:57 +03:30
parent a9f92c751f
commit d1f940c44b
2 changed files with 13 additions and 4 deletions
+8 -4
View File
@@ -1,21 +1,25 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace xCommons.Configurations { namespace xCommons.Configurations
{
/// <summary> /// <summary>
/// represent an xBackend Application /// represent an xBackend Application
/// </summary> /// </summary>
public partial class XAppConfiguration { public partial class XAppConfiguration
{
public string Name { get; set; } public string Name { get; set; }
public string Version { get; set; } public string Version { get; set; }
public string Environment { get; set; } public string Environment { get; set; }
public string XPoweredValue { get; set; } public string XPoweredValue { get; set; }
public IEnumerable<string> AllowedOrigins { get; set; }
public string WelcomeMessage { get; set; } public string WelcomeMessage { get; set; }
public string DefaultLanguage { get; set; } public string DefaultLanguage { get; set; }
public int DefaultCacheTtlMinutes { get; set; } = 15;
public IEnumerable<string> AllowedOrigins { get; set; }
public XMessageResourceTitles MessageResourceTitles { get; set; } public XMessageResourceTitles MessageResourceTitles { get; set; }
} }
public partial class XMessageResourceTitles { public partial class XMessageResourceTitles
{
public string Terms { get; set; } public string Terms { get; set; }
public string Invite { get; set; } public string Invite { get; set; }
public string RegistrationApprove { get; set; } public string RegistrationApprove { get; set; }
+5
View File
@@ -19,9 +19,14 @@ namespace xCommons.Extensions
var xMessageResourceTitlesConfigSection = source var xMessageResourceTitlesConfigSection = source
.GetSection(ConfigurationNodeNames.MESSAGE_RESOURCE_TITLES_NODE); .GetSection(ConfigurationNodeNames.MESSAGE_RESOURCE_TITLES_NODE);
//
// Read TTL ...
int.TryParse(source[nameof(XAppConfiguration.DefaultCacheTtlMinutes)], out int defTTL);
// //
var result = new XAppConfiguration var result = new XAppConfiguration
{ {
DefaultCacheTtlMinutes = defTTL,
Name = source[nameof(XAppConfiguration.Name)], Name = source[nameof(XAppConfiguration.Name)],
Version = source[nameof(XAppConfiguration.Version)], Version = source[nameof(XAppConfiguration.Version)],
XPoweredValue = source[nameof(XAppConfiguration.XPoweredValue)], XPoweredValue = source[nameof(XAppConfiguration.XPoweredValue)],