Update App Configurations ...
This commit is contained in:
@@ -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; }
|
||||||
|
|||||||
@@ -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)],
|
||||||
|
|||||||
Reference in New Issue
Block a user