see on GitHub

Operations: How to Get Connection String

You can get connection strings by using GetConnectionStringsOperation.

Syntax

public GetConnectionStringsOperation()
public GetConnectionStringsOperation(string connectionStringName, ConnectionStringType type)

Parameters
connectionStringName string Connection string name
type ConnectionStringType Connection string type: Raven or Sql
Return Value
SqlConnectionStrings Dictionary<string, SqlConnectionString> Dictionary which maps sql connection string name to definition
RavenConnectionStrings Dictionary<string, RavenConnectionString> Dictionary which maps raven connection string name to definition

RavenConnectionString

public class RavenConnectionString : ConnectionString
{
    public string Database { get; set; } // target database name
    public string[] TopologyDiscoveryUrls; // list of server urls

    public ConnectionStringType Type => ConnectionStringType.Raven;

}

SqlConnectionString

public class SqlConnectionString : ConnectionString
{
    public string ConnectionString { get; set; }

    public string FactoryName { get; set; }

    public ConnectionStringType Type => ConnectionStringType.Sql;

}

ConnectionString

public class ConnectionString
{
    public string Name { get; set; } // name of connection string        
}

Example - Get all Connection Strings

GetConnectionStringsOperation operation = new GetConnectionStringsOperation();
GetConnectionStringsResult connectionStrings = store.Maintenance.Send(operation);
Dictionary<string, SqlConnectionString> sqlConnectionStrings = connectionStrings.SqlConnectionStrings;
Dictionary<string, RavenConnectionString> ravenConnectionStrings = connectionStrings.RavenConnectionStrings;

Example - Get Connection String By Name and Type

GetConnectionStringsOperation operation = 
    new GetConnectionStringsOperation("local_mysql", ConnectionStringType.Sql);
GetConnectionStringsResult connectionStrings = store.Maintenance.Send(operation);
Dictionary<string, SqlConnectionString> sqlConnectionStrings = connectionStrings.SqlConnectionStrings;
SqlConnectionString mysqlConnectionString = sqlConnectionStrings["local_mysql"];