Compare commits

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