Compare commits
1
Commits
a9f92c751f
...
d1f940c44b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1f940c44b |
@@ -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; }
|
||||
|
||||
@@ -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)],
|
||||
|
||||
Reference in New Issue
Block a user