Working on tenants and config
This commit is contained in:
parent
c10de11bbe
commit
f3352318f5
12 changed files with 309 additions and 19 deletions
34
Core/Configurations/PostgresqlConfigurationBuilder/Class2.cs
Normal file
34
Core/Configurations/PostgresqlConfigurationBuilder/Class2.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core.Configurations.PostgresqlConfigurationBuilder
|
||||
{
|
||||
public static class PostgresConfigurationExtensions
|
||||
{
|
||||
public static IConfigurationBuilder AddPostgresConfiguration(
|
||||
this IConfigurationBuilder builder,
|
||||
Action<PostgresConfigurationOptions> setupAction)
|
||||
{
|
||||
var options = new PostgresConfigurationOptions();
|
||||
setupAction(options);
|
||||
|
||||
builder.Add(new PostgresConfigurationSource(
|
||||
options.ConnectionString,
|
||||
options.Channel,
|
||||
options.ConfigurationQuery));
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
||||
public class PostgresConfigurationOptions
|
||||
{
|
||||
public string ConnectionString { get; set; }
|
||||
public string Channel { get; set; }
|
||||
public string ConfigurationQuery { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue