-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfiguration.cs
32 lines (27 loc) · 911 Bytes
/
Configuration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace LionsBlog;
public class Configuration
{
public string DefaultUser { get; set; }
public string DefaultPassword { get; set; }
public string DefaultScreenname { get; set; }
public string DefaultEMail { get; set; }
public string DatabaseFilename { get; set; }
public string TokenSecret { get; set; }
public int PostsPerPage { get; set; }
public string ImageDirectory { get; set; }
public bool EnforceHTTPS { get; set; }
public bool EnableJSFeatures { get; set; }
public bool RecoverAdminUser { get; set; }
}
public class ConfigurationProvider
{
private static Configuration _configuration;
public static void SetConfiguration(IConfiguration configuration)
{
_configuration = configuration.GetSection("LionsBlog").Get<Configuration>();
}
public static Configuration GetConfiguration()
{
return _configuration;
}
}