You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
550 B
23 lines
550 B
using System.Collections.Immutable;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace Connected.Configuration
|
|
{
|
|
internal class DatabaseConfiguration : IDatabaseConfiguration
|
|
{
|
|
private readonly List<string> _shards;
|
|
|
|
public DatabaseConfiguration(IConfiguration configuration)
|
|
{
|
|
DefaultConnectionString = "";
|
|
_shards = new();
|
|
configuration.Bind(this);
|
|
configuration.Bind("shards", _shards);
|
|
}
|
|
|
|
public string? DefaultConnectionString { get; init; }
|
|
|
|
public ImmutableList<string> Shards => _shards.ToImmutableList();
|
|
}
|
|
}
|