public PostgresInstallerStep([CanBeNull] string host, int?port, ICredentialsPrompt credentialsPrompt)
        {
            this.CredentialsPrompt = credentialsPrompt;
            if (host != null)
            {
                var match = Regex.Match(host, @"^(?<HostName>.+):(?<Port>[0-9]+)$");

                if (match.Success)
                {
                    this.Host = match.Groups["HostName"].Value;
                    this.Port = int.Parse(match.Groups["Port"].Value);
                }
            }
            else
            {
                this.Port = port ?? 5432;
            }
        }
Example #2
0
 public InstallDatabaseSchemaTask(string connectionString, ICredentialsPrompt prompt)
     : base(connectionString)
 {
     this.connectionStringBuilder = new NpgsqlConnectionStringBuilder(connectionString);
     this.prompt = prompt;
 }
Example #3
0
 public SelectDatabaseTask(string host, int port, ICredentialsPrompt credentialsPrompt)
 {
     this.Host = host;
     this.Port = port;
     this.CredentialsPrompt = credentialsPrompt;
 }