Пример #1
0
 public WebApiSettings(IApplicationSettings settings)
 {
     IsDevelopment = settings.GetBool("Api.IsDevelopment");
     Port          = settings.GetInt("Api.Port");
     StopTimeout   = settings.GetTimeSpan("Api.StopTimeout");
     settings.TryGetString("Api.Prefix", out var prefix);
     Prefix = prefix == null ? null : "/" + prefix;
 }
Пример #2
0
 public CassandraSettings(IApplicationSettings applicationSettings)
 {
     Keyspace       = applicationSettings.GetString("CustomersAndStaff.Cassandra.Keyspace");
     LockKeyspace   = applicationSettings.GetString("CustomersAndStaff.Cassandra.LockKeyspace");
     LockTtlSeconds = applicationSettings.GetInt("CustomersAndStaff.Cassandra.LockTtlSeconds");
 }