public static void Initialize(VegaConfig config) { if (Instance == null) { Instance = config; } Instance.DataConnectionString = BuildConnectionString(Instance); return; }
private static String BuildConnectionString(VegaConfig config) { NpgsqlConnectionStringBuilder builder = new NpgsqlConnectionStringBuilder { Host = config.DataHostname, Port = config.DataPort, Username = config.DataUsername, Password = config.DataPassword, Database = config.DataDatabase, Pooling = true, MaxPoolSize = 500 }; return(builder.ToString()); }