Esempio n. 1
0
 private Settings(IConfigurationSection section)
 {
     Nodes               = section.GetSection("Nodes").GetChildren().Select(p => p.Get <string>()).ToArray();
     MaxTaskTimeout      = TimeSpan.FromMilliseconds(section.GetValue("MaxTaskTimeout", 432000000));
     AllowPrivateHost    = section.GetValue("AllowPrivateHost", false);
     AllowedContentTypes = section.GetSection("AllowedContentTypes").GetChildren().Select(p => p.Get <string>()).ToArray();
     Https               = new HttpsSettings(section.GetSection("Https"));
 }
Esempio n. 2
0
 private Settings(IConfigurationSection section)
 {
     Network             = section.GetValue("Network", 5195086u);
     Nodes               = section.GetSection("Nodes").GetChildren().Select(p => new Uri(p.Get <string>(), UriKind.Absolute)).ToArray();
     MaxTaskTimeout      = TimeSpan.FromMilliseconds(section.GetValue("MaxTaskTimeout", 432000000));
     AllowPrivateHost    = section.GetValue("AllowPrivateHost", false);
     AllowedContentTypes = section.GetSection("AllowedContentTypes").GetChildren().Select(p => p.Get <string>()).ToArray();
     Https               = new HttpsSettings(section.GetSection("Https"));
     AutoStart           = section.GetValue("AutoStart", false);
 }